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; } }
public unsafe int Decrypt(ref byte[] data) { fixed(byte *data1 = &data[0]) return(FlyffEncryption.EncryptDecrypt((void *)this.decryptionKey, data1, data.Length)); }
public unsafe int Decrypt(ref byte[] data, int offset, int size) { fixed(byte *data1 = &data[offset]) return(FlyffEncryption.EncryptDecrypt((void *)this.decryptionKey, data1, size)); }