CipherException
class CipherException extends Exception (View source)
Exception class for cipher errors
Constants
ALGORITHM_NOT_FOUND |
Cipher '%s' algorithm not found |
STATIC_METHOD_NOT_FOUND |
Cipher static method '%s' not found |
STATIC_METHOD_TOO_MANY_ARGS |
Cipher static method %s can accept max two arguments |
MODE_NOT_FOUND |
Cipher mode not found |
MODE_NOT_AVAILABLE |
Cipher mode %s is not available in installed OpenSSL library |
AUTHENTICATION_NOT_SUPPORTED |
The authentication is not supported for %s cipher mode |
KEY_LENGTH_INVALID |
Invalid length of key for cipher '%s' algorithm (required length: %d) |
IV_LENGTH_INVALID |
Invalid length of initial vector for cipher '%s' algorithm (required length: %d) |
AAD_SETTER_FORBIDDEN |
AAD setter has to be called before encryption or decryption |
AAD_SETTER_FAILED |
AAD setter failed |
AAD_LENGTH_HIGH |
AAD length can't exceed max integer length |
TAG_GETTER_FORBIDDEN |
Tag getter has to be called after encryption |
TAG_SETTER_FORBIDDEN |
Tag setter has to be called before decryption |
TAG_GETTER_FAILED |
Tag getter failed |
TAG_SETTER_FAILED |
Tag setter failed |
TAG_LENGTH_SETTER_FORBIDDEN |
Tag length setter has to be called before encryption |
TAG_LENGTH_LOW |
Tag length can't be lower than 32 bits (4 characters) |
TAG_LENGTH_HIGH |
Tag length can't exceed 128 bits (16 characters) |
TAG_VERIFY_FAILED |
Tag verification failed |
INIT_ALG_FAILED |
Initialization of cipher algorithm failed |
INIT_CTX_FAILED |
Initialization of cipher context failed |
INIT_ENCRYPT_FORBIDDEN |
Cipher object is already used for decryption |
INIT_DECRYPT_FORBIDDEN |
Cipher object is already used for encryption |
UPDATE_FAILED |
Updating of cipher failed |
UPDATE_ENCRYPT_FORBIDDEN |
Cipher object is not initialized for encryption |
UPDATE_DECRYPT_FORBIDDEN |
Cipher object is not initialized for decryption |
FINISH_FAILED |
Finalizing of cipher failed |
FINISH_ENCRYPT_FORBIDDEN |
Cipher object is not initialized for encryption |
FINISH_DECRYPT_FORBIDDEN |
Cipher object is not initialized for decryption |
INPUT_DATA_LENGTH_HIGH |
Input data length can't exceed max integer length |
Properties
protected | $message | The error message |
from Exception |
protected | $code | The error code |
from Exception |
protected | $file | The filename where the error happened |
from Exception |
protected | $line | The line where the error happened |
from Exception |
Methods
Construct the exception. Note: The message is NOT binary safe.
Details
__construct(string $message = "", int $code = 0, null|Throwable $previous = null)
Construct the exception. Note: The message is NOT binary safe.
final string
getMessage()
Gets the Exception message
final int
getCode()
Gets the Exception code
final string
getFile()
Gets the file in which the exception occurred
final int
getLine()
Gets the line in which the exception occurred
final array
getTrace()
Gets the stack trace
final null|Throwable
getPrevious()
Returns previous Exception
final string
getTraceAsString()
Gets the stack trace as a string
string
__toString()
String representation of the exception
void
__wakeup()
No description