public static bool VerifyByPublicKey(byte[] originalData, byte[] signature, string publicKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName, RSASignaturePadding padding) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.VerifyByPublicKey(originalData, signature, hashAlgorithmName, padding)); }
public static bool VerifyByPublicKey(string originalText, string signature, string publicKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName, RSASignaturePadding padding, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.VerifyByPublicKey(originalText, signature, hashAlgorithmName, padding, encoding)); }
public static ISignValue SignByPublicKey(byte[] originalData, string publicKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.SignByPublicKey(originalData, hashAlgorithmName)); }
public static ISignValue SignByPublicKey(string originalText, string publicKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.SignByPublicKey(originalText, hashAlgorithmName, encoding)); }
public static ICryptoValue DecryptByPublicKey(string cipherText, string publicKey, RsaKeyFormat format, RSAEncryptionPadding padding, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.DecryptByPublicKey(cipherText, padding, encoding)); }
public static ICryptoValue DecryptByPublicKey(byte[] cipherData, string publicKey, RsaKeyFormat format, RSAEncryptionPadding padding) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.DecryptByPublicKey(cipherData, padding)); }
public static ICryptoValue EncryptByPublicKey(string originalText, string publicKey, RsaKeyFormat format, bool fOEAP, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.EncryptByPublicKey(originalText, fOEAP, encoding)); }
public static ICryptoValue EncryptByPublicKey(byte[] originalData, string publicKey, RsaKeyFormat format, bool fOEAP) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.EncryptByPublicKey(originalData, fOEAP)); }
public static IRSA CreateWithPublicKey(string key, RsaKeyFormat keyFormat) => new RsaFunction(RsaKeyGenerator.GeneratePublicKey(key, keyFormat));