pdf: Web Client Integration by URL says:
Assigning a SHA-512 hash from a passphrase (512 bit result). This can be implemented in .NET using the SHA512Managed-class. The problem is that my project is in SilverLight, and SHA512Managed is not available for Silverlight, and there is no other version for SilverLight yet.
So basically I am locked in step SHA512:
var passphrase = "mypassphrase"; byte[] byteValue = (new SHA512Managed()).ComputeHash(System.Text.Encoding.UTF8.GetBytes(passphrase)); byte[] key = new byte[32]; byte[] iv = new byte[16]; Array.Copy(byteValue, key, 32); Array.Copy(byteValue, 32, iv, 0, 16); // Declare the stream used to encrypt to an in memory // array of bytes. MemoryStream msEncrypt = null; // Create a RijndaelManaged object // with the specified key and IV. aesAlg = new AesManaged(); aesAlg.Key = key; aesAlg.IV = iv;
Could you tell me if there is another way to encode the url?
source share