add constructors
This commit is contained in:
@@ -53,6 +53,16 @@ namespace Pilz.Cryptography
|
|||||||
set => defaultIV = Convert.FromBase64String(value);
|
set => defaultIV = Convert.FromBase64String(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AESStringCrypter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public AESStringCrypter(string key, string iv) : this()
|
||||||
|
{
|
||||||
|
Key = key;
|
||||||
|
IV = iv;
|
||||||
|
}
|
||||||
|
|
||||||
public string Decrypt(string encryptedValue)
|
public string Decrypt(string encryptedValue)
|
||||||
{
|
{
|
||||||
return DecryptStringFromBytes_Aes(Convert.FromBase64String(encryptedValue), GetKey(), GetIV());
|
return DecryptStringFromBytes_Aes(Convert.FromBase64String(encryptedValue), GetKey(), GetIV());
|
||||||
|
|||||||
Reference in New Issue
Block a user