RC4 implementation in Pascal