Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2025-02-20 (Yesterday)  | | Not yet rated by the users | | Total: Not yet counted | | Not yet ranked |
|
Description | | Author |
This class can encrypt and decrypt texts using the OpenSSL extension.
It can take encryption key and information vector values to encrypt data using the aes-256-CBC cipher algorithm.
The class can decrypt previously encrypted data decrypt it and return the original encrypted data. | |
|
Instructions
The CryptoHelper class provides methods to encrypt and decrypt texts using the AES-256-CBC algorithm.
It requires a secret key and an initialization vector (IV), both encoded in Base64, ensuring that data remains securely protected.
The class automatically validates whether the key is 32 bytes and the IV is 16 bytes, as required by AES-256-CBC.
🔹 Methods:
__construct($key, $iv):
Initializes the class, decoding and validating the key and IV.
encryption($plainText):
Encrypts a text and returns the result in Base64.
decryptAES($cipherText):
Decrypts a Base64-encoded encrypted text and returns the original plain text.
This implementation uses the OpenSSL library, which is fast, secure, and built into PHP.
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.