daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Feb 20th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. String clearKey = "test";
  2.         IBuffer buffEntry = CryptographicBuffer.ConvertStringToBinary(clearKey, BinaryStringEncoding.Utf8);
  3.         HashAlgorithmProvider algProvider = HashAlgorithmProvider.OpenAlgorithm(HashAlgorithmNames.Md5);
  4.  
  5.         IBuffer buffHashed = algProvider.HashData(buffEntry);
  6.  
  7.         byte[] bytesKey;
  8.         CryptographicBuffer.CopyToByteArray(buffHashed, out bytesKey);
  9.         Debug.WriteLine(String.Format("bytesKey lenght : {0}", bytesKey.Length));
  10.    
  11. string md5Hex = CryptographicBuffer.EncodeToHexStringbuffHashed(buffEntry);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top