Appearance
DecryptWithPassword Method
Definition
- Namespace:
JASE.Crypto - Assembly:
JASE.Crypto.dll
Overloads
| Name | Description |
|---|---|
byte[] DecryptWithPassword(byte[] data, string password, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null) | Decrypts a password container produced by EncryptWithPassword. The salt and iteration count are read from the container. |
string DecryptWithPassword(string data, string password, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null) | Decrypts a Base64 password container produced by EncryptWithPassword. |
byte[] DecryptWithPassword(byte[] data, string password, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null)
csharp
byte[] DecryptWithPassword(byte[] data, string password, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null)Decrypts a password container produced by EncryptWithPassword. The salt and iteration count are read from the container.
Parameters
| Name | Description |
|---|---|
algorithm | Symmetric algorithm (default AES-256). |
data | The password container (saltLen ‖ salt ‖ iterations ‖ IV ‖ ciphertext). |
padding | Block padding mode (default PKCS7). |
password | The passphrase. PBKDF2 uses its UTF-8 bytes. |
Returns
The decrypted plaintext.
string DecryptWithPassword(string data, string password, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null)
csharp
string DecryptWithPassword(string data, string password, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null)Decrypts a Base64 password container produced by EncryptWithPassword.
Parameters
| Name | Description |
|---|---|
algorithm | Symmetric algorithm (default AES-256). |
data | Base64-encoded password container. |
padding | Block padding mode (default PKCS7). |
password | The passphrase. PBKDF2 uses its UTF-8 bytes. |
Returns
The decrypted string.