try decrypt
This commit is contained in:
@@ -64,9 +64,16 @@ namespace Pilz.Cryptography
|
||||
}
|
||||
|
||||
public string Decrypt(string encryptedValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
return DecryptStringFromBytes_Aes(Convert.FromBase64String(encryptedValue), GetKey(), GetIV());
|
||||
}
|
||||
catch (CryptographicException)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static string Decrypt(string encryptedValue, string key, string iv)
|
||||
{
|
||||
@@ -75,9 +82,16 @@ namespace Pilz.Cryptography
|
||||
}
|
||||
|
||||
public string Encrypt(string plainValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
return Convert.ToBase64String(EncryptStringToBytes_Aes(plainValue, GetKey(), GetIV()));
|
||||
}
|
||||
catch (CryptographicException)
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public static string Encrypt(string plainValue, string key, string iv)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user