AESnopad
Com\Tecnick\Pdf\Encrypt\Type\AESnopad
AES no-padding
Tags
Table of Contents
- BLOCKSIZE = 16
- Block size (IV length): openssl_cipher_iv_length('aes-256-cbc')
- IVECT = ""
- Initialization Vector (16 bytes)
- encrypt() : string
- Encrypt the data
- pad() : string
- Pad the input string to the specified length (RFC 2898, PKCS #5: Password-Based Cryptography Specification Version 2.0)
Constants
BLOCKSIZE
Block size (IV length): openssl_cipher_iv_length('aes-256-cbc')
public mixed BLOCKSIZE = 16
IVECT
Initialization Vector (16 bytes)
public mixed IVECT = ""
Methods
encrypt()
Encrypt the data
public encrypt(string $data,
string $key[,
string $ivect
= self::IVECT
][,
string $mode
= 'aes-256-cbc'
]) : string
Parameters
- $data : string
-
Data string to encrypt
- $key : string
-
Encryption key
- $ivect : string = self::IVECT
-
Initialization vector
- $mode : string = 'aes-256-cbc'
-
Cipher
Return values
string —Encrypted data string.
pad()
Pad the input string to the specified length (RFC 2898, PKCS #5: Password-Based Cryptography Specification Version 2.0)
protected pad(string $data,
int $length)
: string
Parameters
- $data : string
-
Data to pad
- $length : int
-
Padding length