-
-
-
-
-
Create a new encrypter instance.
-
Encrypt the given value.
-
generateInputVector() : stringGenerate an input vector.
-
Actually encrypt the value using the given Iv with the openssl library encrypt function.
-
Decrypt the given value.
-
Actually decrypt the value using the given Iv with the openssl library decrypt function.
-
Get the JSON array from the given payload.
-
Create a MAC for the given value.
-
Add PKCS7 padding to a given value.
-
Remove the padding from the given value.
-
Determine if the given padding for a value is valid.
-
Verify that the encryption payload is valid.
-
getIvSize() : intGet the IV size for the cipher.
-
public function setKey(variable $key)
-
public function setCipher(variable $cipher)
-
public function setMode(variable $mode)
-
public function setBlock(variable $block)
-
public function __construct(string $key)
Create a new encrypter instance. -
public function encrypt(string $text)
Encrypt the given value. -
protected function generateInputVector()
Generate an input vector. -
protected function doEncrypt(string $value, string $iv)
Actually encrypt the value using the given Iv with the openssl library encrypt function. -
public function decrypt(string $text)
Decrypt the given value. -
protected function doDecrypt(string $value, string $iv)
Actually decrypt the value using the given Iv with the openssl library decrypt function. -
protected function getJsonPayload(string $text)
Get the JSON array from the given payload. -
protected function hash(string $value)
Create a MAC for the given value. -
protected function addPadding(string $value)
Add PKCS7 padding to a given value. -
protected function stripPadding(string $value)
Remove the padding from the given value. -
protected function paddingIsValid(int $pad, string $value)
Determine if the given padding for a value is valid. -
protected function invalidPayload(array $data)
Verify that the encryption payload is valid. -
protected function getIvSize()
Get the IV size for the cipher.