| Fully Qualified Name: | Laminas\Crypt\FileCipher |
Encrypt/decrypt a file using a symmetric cipher in CBC mode then authenticate using HMAC
| Name | Description | Defined By |
|---|---|---|
| __construct() | Constructor | FileCipher |
| decrypt() | Decrypt a file | FileCipher |
| encrypt() | Encrypt then authenticate a file using HMAC | FileCipher |
| getCipher() | Get the cipher object | FileCipher |
| getCipherAlgorithm() | Get the cipher algorithm | FileCipher |
| getCipherSupportedAlgorithms() | Get the supported algorithms of the symmetric cipher | FileCipher |
| getHashAlgorithm() | Get the hash algorithm for HMAC authentication | FileCipher |
| getKey() | Get the key | FileCipher |
| getKeyIteration() | Get the number of iterations for Pbkdf2 | FileCipher |
| getPbkdf2HashAlgorithm() | Get the Pbkdf2 hash algorithm | FileCipher |
| setCipher() | Set the cipher object | FileCipher |
| setCipherAlgorithm() | Set algorithm of the symmetric cipher | FileCipher |
| setHashAlgorithm() | Set the hash algorithm for HMAC authentication | FileCipher |
| setKey() | Set the encryption/decryption key | FileCipher |
| setKeyIteration() | Set the number of iterations for Pbkdf2 | FileCipher |
| setPbkdf2HashAlgorithm() | Set the hash algorithm for the Pbkdf2 | FileCipher |
Constructor
| Parameter Name | Type | Description |
|---|---|---|
| $cipher | \SymmetricInterface |
Returns:
Decrypt a file
| Parameter Name | Type | Description |
|---|---|---|
| $fileIn | string | |
| $fileOut | string | |
| $compress | bool |
Returns: bool
Encrypt then authenticate a file using HMAC
| Parameter Name | Type | Description |
|---|---|---|
| $fileIn | string | |
| $fileOut | string |
Returns: bool
Get the cipher object
Returns: \SymmetricInterface
Get the cipher algorithm
Returns: string|bool
Get the supported algorithms of the symmetric cipher
Returns: array
Get the hash algorithm for HMAC authentication
Returns: string
Get the key
Returns: string|null
Get the number of iterations for Pbkdf2
Returns: int
Get the Pbkdf2 hash algorithm
Returns: string
Set the cipher object
| Parameter Name | Type | Description |
|---|---|---|
| $cipher | \SymmetricInterface |
Returns:
Set algorithm of the symmetric cipher
| Parameter Name | Type | Description |
|---|---|---|
| $algo | string |
Returns:
Set the hash algorithm for HMAC authentication
| Parameter Name | Type | Description |
|---|---|---|
| $hash | string |
Returns:
Set the encryption/decryption key
| Parameter Name | Type | Description |
|---|---|---|
| $key | string |
Returns:
Set the number of iterations for Pbkdf2
| Parameter Name | Type | Description |
|---|---|---|
| $num | int |
Returns:
Set the hash algorithm for the Pbkdf2
| Parameter Name | Type | Description |
|---|---|---|
| $hash | string |
Returns: