/// <summary> /// Encrypt the string using Assembly DLL /// </summary> /// <param name="message"></param> /// <returns></returns> public byte[] EncryptMessage(string message, string key) { byte[] m = StringToByteArray(message); byte[] k = StringToByteArray(key); ASMDLL.Encrypt(m, k, 16); return(m); }
/// <summary> /// Encrypt the string using Assembly DLL /// </summary> /// <param name="message"></param> /// <returns></returns> public byte[] EncryptMessage(string message, string key) { byte[] msg = StringToByteArray(message); byte[] keym = StringToByteArray(key); ASMDLL.Encrypt(msg, keym, msg.Length); return(msg); }
// text =328831e0435a3137f6309807a88da234 // key = 2b28ab097eaef7cf15d2154f16a6883c // decrypted = 3902dc1925dc116a8409850b1dfb9732 // dec_key = d0c9e1b614ee3f63f9250c0ca889c8a6 /// <summary> /// Encrypt the string using Assembly DLL /// </summary> /// <param name="message"></param> /// <returns></returns> public byte[] EncryptMessage(string message, string key) { int len = message.Length; int len2 = key.Length; byte[] text = StringToByteArray(message); byte[] Key = StringToByteArray(key); ASMDLL.Encrypt(text, Key, 16); byte[] trueOut = StringToByteArray("69c4e0d86a7b0430d8cdb78070b4c55a"); MessageBox.Show("" + text.SequenceEqual(trueOut)); return(text); }