public SignData ( |
||
data | ||
hashAlgorithm | HashAlgorithmName | |
Résultat | byte[] |
public virtual byte[] SignData(Stream data, HashAlgorithmName hashAlgorithm)
{
if (data == null) { throw new ArgumentNullException(nameof(data)); }
if (String.IsNullOrEmpty(hashAlgorithm.Name)) { throw HashAlgorithmNameNullOrEmpty(); }
byte[] hash = HashData(data, hashAlgorithm);
return CreateSignature(hash);
}
public byte[] SignData(byte[] buffer) { return(_impl.SignData(buffer, HashAlgorithmName.SHA1)); }