public bool Verify(string rgbText, string rgbSignature, SignatureTextTypes signatureTextType, Encoding encoding, CancellationToken cancellationToken, Func <string, byte[]> customSignatureTextConverter = null) { encoding = encoding.SafeEncodingValue(); var finalSignature = signatureTextType.GetBytes(rgbSignature, encoding, customSignatureTextConverter); return(Verify(encoding.GetBytes(rgbText), finalSignature, cancellationToken)); }
public bool VerifyByPrivateKey(string text, string signature, SignatureTextTypes signatureTextType, HashAlgorithmName hashAlgorithmName, RSASignaturePadding padding, Encoding encoding, CancellationToken cancellationToken, Func <string, byte[]> customSignatureTextConverter = null) { encoding = encoding.SafeEncodingValue(); var finalSignature = signatureTextType.GetBytes(signature, encoding, customSignatureTextConverter); return(VerifyByPrivateKey(encoding.GetBytes(text), finalSignature, hashAlgorithmName, padding, CancellationToken.None)); }