Skip to content

Decrypt Method ​

Definition ​

  • Namespace: JASE.Crypto
  • Assembly: JASE.Crypto.dll

Overloads ​

NameDescription
byte[] Decrypt(byte[] data, byte[] key, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null)Decrypts an IV ‖ ciphertext payload produced with a raw key.
string Decrypt(string data, byte[] key, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null)Decrypts a Base64 IV ‖ ciphertext string produced with a raw key.

byte[] Decrypt(byte[] data, byte[] key, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null) ​

csharp
byte[] Decrypt(byte[] data, byte[] key, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null)

Decrypts an IV ‖ ciphertext payload produced with a raw key.

Parameters ​

NameDescription
algorithmSymmetric algorithm (default AES-256).
dataCiphertext as IV ‖ ciphertext.
keyRaw key material used to encrypt.
paddingBlock padding mode (default PKCS7).

Returns ​

The decrypted plaintext.

string Decrypt(string data, byte[] key, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null) ​

csharp
string Decrypt(string data, byte[] key, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null)

Decrypts a Base64 IV ‖ ciphertext string produced with a raw key.

Parameters ​

NameDescription
algorithmSymmetric algorithm (default AES-256).
dataBase64-encoded ciphertext.
keyRaw key material used to encrypt.
paddingBlock padding mode (default PKCS7).

Returns ​

The decrypted string.