public static bool VerifyByPrivateKey(byte[] originalData, byte[] signature, string privateKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName, RSASignaturePadding padding) { var key = RsaKeyGenerator.GeneratePrivateKey(privateKey, format); var function = Factory.Create(key); return(function.VerifyByPrivateKey(originalData, signature, hashAlgorithmName, padding)); }
public static bool VerifyByPrivateKey(string originalText, string signature, string privateKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName, RSASignaturePadding padding, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePrivateKey(privateKey, format); var function = Factory.Create(key); return(function.VerifyByPrivateKey(originalText, signature, hashAlgorithmName, padding, encoding)); }
public static ISignValue SignByPrivateKey(byte[] originalData, string privateKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName) { var key = RsaKeyGenerator.GeneratePrivateKey(privateKey, format); var function = Factory.Create(key); return(function.SignByPrivateKey(originalData, hashAlgorithmName)); }
public static ISignValue SignByPrivateKey(string originalText, string privateKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePrivateKey(privateKey, format); var function = Factory.Create(key); return(function.SignByPrivateKey(originalText, hashAlgorithmName, encoding)); }
public static ICryptoValue DecryptByPrivateKey(string cipherText, string privateKey, RsaKeyFormat format, RSAEncryptionPadding padding, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePrivateKey(privateKey, format); var function = Factory.Create(key); return(function.DecryptByPrivateKey(cipherText, padding, encoding)); }
public static ICryptoValue DecryptByPrivateKey(byte[] cipherData, string privateKey, RsaKeyFormat format, RSAEncryptionPadding padding) { var key = RsaKeyGenerator.GeneratePrivateKey(privateKey, format); var function = Factory.Create(key); return(function.DecryptByPrivateKey(cipherData, padding)); }
public static ICryptoValue EncryptByPrivateKey(string originalText, string privateKey, RsaKeyFormat format, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePrivateKey(privateKey, format); var function = Factory.Create(key); return(function.EncryptByPrivateKey(originalText, encoding)); }
public static ICryptoValue EncryptByPrivateKey(byte[] originalData, string privateKey, RsaKeyFormat format) { var key = RsaKeyGenerator.GeneratePrivateKey(privateKey, format); var function = Factory.Create(key); return(function.EncryptByPrivateKey(originalData)); }
public static IRSA CreateWithPrivateKey(string key, RsaKeyFormat keyFormat) => new RsaFunction(RsaKeyGenerator.GeneratePrivateKey(key, keyFormat));