Encrypts byte arrays.
More...
|
|
| Encryptor () |
| | Instantiate an encryptor.
|
| |
| | Encryptor (int threads) |
| | Instantiate an encryptor with parallel tasks and buffer size.
|
| |
| | Encryptor (int threads, int bufferSize) |
| | Instantiate an encryptor with parallel tasks and buffer size.
|
| |
| byte[] | Encrypt (byte[] data, byte[] key, byte[] nonce, EncryptionFormat format, bool integrity=false, byte[] hashKey=null, int chunkSize=0) |
| | Encrypts a byte array using the provided key and nonce.
|
| |
|
void | Close () |
| | Close all associated resources.
|
| |
◆ Encryptor() [1/2]
| Mku.Salmon.Encryptor.Encryptor |
( |
int | threads | ) |
|
Instantiate an encryptor with parallel tasks and buffer size.
- Parameters
-
| threads | The number of threads to use. |
◆ Encryptor() [2/2]
| Mku.Salmon.Encryptor.Encryptor |
( |
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). |
◆ Encrypt()
| byte[] Mku.Salmon.Encryptor.Encrypt |
( |
byte[] | data, |
|
|
byte[] | key, |
|
|
byte[] | nonce, |
|
|
EncryptionFormat | format, |
|
|
bool | integrity = false, |
|
|
byte[] | hashKey = null, |
|
|
int | chunkSize = 0 ) |
Encrypts a byte array using the provided key and nonce.
- Parameters
-
| data | The byte array to be encrypted. |
| key | The AES key to be used. |
| nonce | The nonce to be used. |
| format | The format to use, see EncryptionFormat |
| integrity | True if you want to calculate and store hash signatures for each chunkSize. |
| hashKey | Hash key to be used for all chunks. |
| chunkSize | The chunk size. |
- Returns
- The byte array with the encrypted data.
- Exceptions
-
| SecurityException | Thrown when error with security |
| 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: