示例#1
0
        public unsafe KeyPair(int seed)
        {
            this.Seed = seed;
            fixed(byte *data = new byte[(uint)ushort.MaxValue])
            {
                FlyffEncryption.GenerateKey(seed, data);
                encryptionKey = data;
            }

            fixed(byte *data = new byte[(uint)ushort.MaxValue])
            {
                FlyffEncryption.GenerateKey(seed, data);
                decryptionKey = data;
            }
        }
示例#2
0
 public unsafe int Decrypt(ref byte[] data)
 {
     fixed(byte *data1 = &data[0])
     return(FlyffEncryption.EncryptDecrypt((void *)this.decryptionKey, data1, data.Length));
 }
示例#3
0
 public unsafe int Decrypt(ref byte[] data, int offset, int size)
 {
     fixed(byte *data1 = &data[offset])
     return(FlyffEncryption.EncryptDecrypt((void *)this.decryptionKey, data1, size));
 }