Utility class that decrypts byte arrays.
More...
|
| Decryptor () |
| Instantiate an encryptor.
|
|
| Decryptor (int threads) |
| Instantiate an encryptor with parallel tasks and buffer size.
|
|
| Decryptor (int threads, int bufferSize) |
| Instantiate an encryptor with parallel tasks and buffer size.
|
|
byte[] | Decrypt (byte[] data, byte[] key, byte[] nonce=null, EncryptionFormat format=EncryptionFormat.Salmon, bool integrity=true, byte[] hashKey=null, int chunkSize=0) |
| Decrypt a byte array using AES256 based on the provided key and nonce.
|
|
void | Close () |
| Close all associated resources.
|
|
Utility class that decrypts byte arrays.
◆ Decryptor() [1/2]
Mku.Salmon.Decryptor.Decryptor |
( |
int | threads | ) |
|
Instantiate an encryptor with parallel tasks and buffer size.
- Parameters
-
threads | The number of threads to use. |
◆ Decryptor() [2/2]
Mku.Salmon.Decryptor.Decryptor |
( |
int | threads, |
|
|
int | bufferSize ) |
Instantiate an encryptor with parallel tasks and buffer size.
- Parameters
-
threads | The number of threads to use. |
bufferSize | The buffer size to use. It is recommended for performance to use a multiple of the chunk size if you enabled integrity otherwise a multiple of the AES block size (16 bytes). |
◆ Decrypt()
byte[] Mku.Salmon.Decryptor.Decrypt |
( |
byte[] | data, |
|
|
byte[] | key, |
|
|
byte[] | nonce = null, |
|
|
EncryptionFormat | format = EncryptionFormat::Salmon, |
|
|
bool | integrity = true, |
|
|
byte[] | hashKey = null, |
|
|
int | chunkSize = 0 ) |
Decrypt a byte array using AES256 based on the provided key and nonce.
- Parameters
-
data | The input data to be decrypted. |
key | The AES key to use for decryption. |
nonce | The nonce to use for decryption. |
format | The EncryptionFormat. |
integrity | Verify hash integrity in the data. |
hashKey | The hash key to be used for integrity. |
chunkSize | The chunk size. |
- Returns
- The byte array with the decrypted data.
- Exceptions
-
IOException | Thrown if there is a problem with decoding the array. |
SecurityException | Thrown if the key and nonce are not provided. |
IOException | Thrown if error during IO |
IntegrityException | Thrown when data are corrupt or tampered with. |
The documentation for this class was generated from the following file: