public byte[] Sign(byte[] input) // , string privateKey
        {
            var inputHashText = _hashAlgorithm.Calculate(input);

            Signature = _algorithm.Sign(input, _hashAlgorithm); //, _algorithm.PrivateKey);

            return(Signature);
        }
示例#2
0
 protected virtual string GetSignature(string filePath)
 {
     using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read, BufferSize, FileOptions.None))
     {
         var hash = _hashAlgorithm.Calculate(stream);
         return(hash);
     }
 }