xxtea / xxtea-dotnet

XXTEA encryption algorithm library for .NET.
MIT License
94 stars 38 forks source link

XXTEA.DecryptToString() throws System.ArgumentNullException #1

Open cnrting opened 8 years ago

cnrting commented 8 years ago

code: public static void Main (string[] args) { string encrypt_data = "AgCwAP////8AAAAAAIAAALAFAA68k8Tb7TCcSrvGAVaxkx9W"; string key = "VJl53SVcTSYvyFF0"; byte[] data = Convert.FromBase64String(encrypt_data); byte[] ndata = new byte[16]; Array.Copy(data,20,ndata,0,16); Console.WriteLine(BitConverter.ToString(ndata));
string decrypt_data = XXTEA.DecryptToString(ndata,key); Console.WriteLine(decrypt_data); Console.ReadLine(); }

The Arguments are as below: key "VJl53SVcTSYvyFF0" string

andot commented 8 years ago

Where is the encrypted data coming from?

This library only supports the data encrypted with the https://github.com/xxtea.