using System; using System.Text; using Microsoft.SPOT; using Microsoft.SPOT.Cryptography; namespace myNamespace { public class Encryption { public static string Encrypt(string message) { string key = "0x081632"; byte[] data = Encoding.UTF8.GetBytes(message); byte[] xteaKey = Encoding.UTF8.GetBytes(key); Key_TinyEncryptionAlgorithm xtea = new Key_TinyEncryptionAlgorithm(xteaKey); byte[] encryptedBytes = xtea.Encrypt(data, 0, data.Length, xteaKey); string encryptedString = Convert.ToBase64String(encryptedBytes); return encryptedString; } } }
I have a reference to Microsoft.SPOT.Native which holds the Microsoft.SPOT.Cryptography namespace according to
http://msdn.microsof...y/cc506813.aspx
but I keep getting the following error:
The type or namespace name 'Cryptography' does not exist in the namespace 'Microsoft.SPOT' (are you missing an assembly reference?)
I've also heard mention that I need to 'install' Cryptography library on the netduino plus. Is this correct, if so how to I do it?
thanks,
John