示例#1
0
        public void Init()
        {
            TmpKey1 = Utils.ShiftKey(ServerKey1, 31);
            TmpKey2 = Utils.XorKey(TmpKey1, ClientKey1);

            TmpKey1    = Utils.ShiftKey(ClientKey2, 17, false);
            DecryptKey = Utils.XorKey(TmpKey1, TmpKey2);

            Decryptor = new Cryptor(DecryptKey);

            TmpKey1 = Utils.ShiftKey(ServerKey2, 79);
            Decryptor.ApplyCryptor(TmpKey1, 128);
            EncryptKey = new byte[128];
            Buffer.BlockCopy(TmpKey1, 0, EncryptKey, 0, 128);

            Encryptor = new Cryptor(EncryptKey);
        }
示例#2
0
        public void Init()
        {
            TmpKey1 = Utils.ShiftKey(ServerKey1, 31);
            TmpKey2 = Utils.XorKey(TmpKey1, ClientKey1);

            TmpKey1 = Utils.ShiftKey(ClientKey2, 17, false);
            DecryptKey = Utils.XorKey(TmpKey1, TmpKey2);

            Decryptor = new Cryptor(DecryptKey);

            TmpKey1 = Utils.ShiftKey(ServerKey2, 79);
            Decryptor.ApplyCryptor(TmpKey1, 128);
            EncryptKey = new byte[128];
            Buffer.BlockCopy(TmpKey1, 0, EncryptKey, 0, 128);

            Encryptor = new Cryptor(EncryptKey);
        }