Ejemplo n.º 1
0
 public static void Encrypt(byte[] data, int start, int count)
 {
     if (Status == AuthStatus.Ready)
     {
         encryptionStream.Process(data, start, count);
     }
 }
Ejemplo n.º 2
0
        public static void Initialize(byte[] sessionKey)
        {
            // create RC4-drop[1024] stream
            encryptionStream = new ARC4(outputHMAC.ComputeHash(sessionKey));
            encryptionStream.Process(new byte[1024], 0, 1024);

            // create RC4-drop[1024] stream
            decryptionStream = new ARC4(inputHMAC.ComputeHash(sessionKey));
            decryptionStream.Process(new byte[1024], 0, 1024);

            Status = AuthStatus.Ready;
        }
Ejemplo n.º 3
0
        public static void Initialize(byte[] sessionKey)
        {
            // create RC4-drop[1024] stream
            encryptionStream = new ARC4(outputHMAC.ComputeHash(sessionKey));
            encryptionStream.Process(new byte[1024], 0, 1024);

            // create RC4-drop[1024] stream
            decryptionStream = new ARC4(inputHMAC.ComputeHash(sessionKey));
            decryptionStream.Process(new byte[1024], 0, 1024);

            Status = AuthStatus.Ready;
        }