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 SignByPublicKey(string originalText, string publicKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName, RSASignaturePadding padding, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.SignByPublicKey(originalText, hashAlgorithmName, padding, encoding)); }
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 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 SignByPublicKey(byte[] originalData, string publicKey, RsaKeyFormat format, HashAlgorithmName hashAlgorithmName, RSASignaturePadding padding) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.SignByPublicKey(originalData, hashAlgorithmName, padding)); }
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 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 DecryptByPublicKey(string cipherText, string publicKey, RsaKeyFormat format, bool fOEAP, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.DecryptByPublicKey(cipherText, encoding)); }
public static ICryptoValue DecryptByPublicKey(byte[] cipherData, string publicKey, RsaKeyFormat format, bool fOEAP) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.DecryptByPublicKey(cipherData)); }
public static ICryptoValue EncryptByPublicKey(string originalText, string publicKey, RsaKeyFormat format, RSAEncryptionPadding padding, Encoding encoding = null) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.EncryptByPublicKey(originalText, padding, encoding)); }
public static ICryptoValue EncryptByPublicKey(byte[] originalData, string publicKey, RsaKeyFormat format, RSAEncryptionPadding padding) { var key = RsaKeyGenerator.GeneratePublicKey(publicKey, format); var function = Factory.Create(key); return(function.EncryptByPublicKey(originalData, padding)); }
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)); }