Encrypt using a symmetric cipher then authenticate using HMAC (SHA-256)
Factory.
| Parameters: |
|
|---|---|
| Return type: | BlockCipher |
Returns the symmetric cipher plugin manager. If it doesn’t exist it’s created.
| Return type: | SymmetricPluginManager |
|---|
Set the symmetric cipher plugin manager
| Parameters: | string|SymmetricPluginManager – |
|---|---|
| Throws ExceptionInvalidArgumentException: | |
Set the symmetric cipher
| Parameters: | SymmetricInterface – |
|---|---|
| Return type: | BlockCipher |
Set the number of iterations for Pbkdf2
| Parameters: | integer – |
|---|---|
| Return type: | BlockCipher |
Get the number of iterations for Pbkdf2
| Return type: | integer |
|---|
Set the salt (IV)
| Parameters: | string – |
|---|---|
| Return type: | BlockCipher |
| Throws : | ExceptionInvalidArgumentException |
Get the salt (IV) according to the size requested by the algorithm
| Return type: | string |
|---|
Enable/disable the binary output
| Parameters: | bool – |
|---|---|
| Return type: | BlockCipher |
Set the encryption/decryption key
| Parameters: | string – |
|---|---|
| Return type: | BlockCipher |
| Throws : | ExceptionInvalidArgumentException |
Set algorithm of the symmetric cipher
| Parameters: | string – |
|---|---|
| Return type: | BlockCipher |
| Throws : | ExceptionInvalidArgumentException |
Get the cipher algorithm
| Return type: | string|bool |
|---|
Get the supported algorithms of the symmetric cipher
| Return type: | array |
|---|
Set the hash algorithm for HMAC authentication
| Parameters: | string – |
|---|---|
| Return type: | BlockCipher |
| Throws : | ExceptionInvalidArgumentException |
Get the hash algorithm for HMAC authentication
| Return type: | string |
|---|
Encrypt then authenticate using HMAC
| Parameters: | string – |
|---|---|
| Return type: | string |
| Throws : | ExceptionInvalidArgumentException |
Decrypt
| Parameters: | string – |
|---|---|
| Return type: | string|bool |
| Throws : | ExceptionInvalidArgumentException |