Пример #1
0
 public static byte[] ComputeHashValue(byte[] value, FirmaXadesNet.Crypto.DigestMethod digestMethod)
 {
     using (var alg = digestMethod.GetHashAlgorithm())
     {
         return(alg.ComputeHash(value));
     }
 }
Пример #2
0
 public static void SetCertDigest(byte[] rawCert, FirmaXadesNet.Crypto.DigestMethod digestMethod, DigestAlgAndValueType destination)
 {
     using (var hashAlg = digestMethod.GetHashAlgorithm())
     {
         destination.DigestMethod.Algorithm = digestMethod.URI;
         destination.DigestValue            = hashAlg.ComputeHash(rawCert);
     }
 }