using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AvalonIO.Algorithms { class Diablo3Cipher { private int Cipher(byte[] buffer, uint length) { ulong iv = 0x2EC9A01B305F92D8; if (buffer == null) return -1; for (int i = 0; i < length; i++) { ulong temp = buffer ^ (iv & 0xFF); buffer = Convert.ToByte(temp & 0xFF); iv = ((iv ^ buffer) << 56) | (iv >> 8); } // success return 0; } } } Enjoy and give credit to me if you use.
well first learn C# or secondly just paste it in a .cs class and compile as a .dll and use in what ever language you do, but I didn't give out the encryption, it only decrypts, to encrypt it is same exact code but you need to make it save the byte to use with the IV.