示例#1
0
 public static string SHA512(string data)
 {
     byte[] hash;
     using (SHA512 shaM = new SHA512Managed())
     {
         hash = shaM.ComputeHash(data.GetBytes());
     }
     return(AESProvider.HexString(hash));
 }
示例#2
0
 public static string GenerateRandomString(int length)
 {
     return(AESProvider.HexString(AESProvider.GenerateRandomBytes(length)));
 }