private DecodeRSAPrivateKey ( [ privkey ) : |
||
privkey | [ | |
Résultat |
public byte[] Sign(byte[] data) { using (var rsa = OpenSslKey.DecodeRSAPrivateKey(_key)) { byte[] signature = rsa.SignData(data, _algorithmInfo.SigningAlgorithm == SigningAlgorithm.RSASha1 ? "SHA1" : "SHA256"); return(signature); } }
public byte[] Sign(byte[] data, SigningAlgorithm algorithm) { if (data == null) { throw new ArgumentNullException("data"); } using (var rsa = OpenSslKey.DecodeRSAPrivateKey(_key)) { byte[] signature = rsa.SignData(data, GetHashName(algorithm)); return(signature); } }