Exemplo n.º 1
0
 public static string GetHash(string containerName, bool includePrivateParameters = true, int size = 20)
 {
     if (size > 20)
     {
         throw new ArgumentException("Size must be 20 or less");
     }
     return(RsaUtilities.GetKeyFromContainer(containerName, includePrivateParameters).GetStringHash().Substring(0, size * 2));
 }
Exemplo n.º 2
0
 public static byte[] GetKey(string containerName, bool includePrivateParameters = true, int size = 20)
 {
     if (size > 20)
     {
         throw new ArgumentException("Size must be 20 or less");
     }
     return(RsaUtilities.GetKeyFromContainer(containerName, includePrivateParameters).GetBytesHash().Take(size).ToArray());
 }