Download the PHP package kishor-rajbanshi/php-crypt without Composer
On this page you can find all versions of the php package kishor-rajbanshi/php-crypt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download kishor-rajbanshi/php-crypt
More information about kishor-rajbanshi/php-crypt
Files in kishor-rajbanshi/php-crypt
Download kishor-rajbanshi/php-crypt
More information about kishor-rajbanshi/php-crypt
Files in kishor-rajbanshi/php-crypt
Vendor kishor-rajbanshi
Package php-crypt
Short Description The PHP Encryptor and Decryptor
License MIT
Homepage https://github.com/kishor-rajbanshi/php-crypt
Package php-crypt
Short Description The PHP Encryptor and Decryptor
License MIT
Homepage https://github.com/kishor-rajbanshi/php-crypt
Please rate this library. Is it a good library?
Informations about the package php-crypt
PHP Crypt
A lightweight encryption and decryption library built on top of OpenSSL, supporting:
- AES-128-CBC
- AES-256-CBC
- MAC validation (HMAC SHA-256)
- Secure payload structure (IV + value + MAC)
- String and serialized value encryption
Installation
`
Supported Ciphers
AES-128-CBC(requires 16-byte key)AES-256-CBC(requires 32-byte key)
Generating a Key
Basic Usage
Create Crypter Instance
Encrypt & Decrypt Any Value (Serialized)
Encrypt & Decrypt Strings Only (No Serialization)
Payload Structure
Encrypted payload is:
The MAC ensures data integrity and prevents tampering.
Exception Handling
The package throws custom exceptions:
KishorRajbanshi\Crypt\Exceptions\EncryptKishorRajbanshi\Crypt\Exceptions\Decrypt
Example
Key Length Validation
The constructor validates key length automatically:
- AES-128-CBC → 16 bytes
- AES-256-CBC → 32 bytes
If invalid, it throws:
Security Notes
- Always store your encryption key securely.
- Never expose your key publicly.
- Rotate keys periodically if used in production.
- Do not modify encrypted payloads manually.
Running Tests
License
MIT
All versions of php-crypt with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.3
ext-json Version *
ext-mbstring Version *
ext-openssl Version *
ext-json Version *
ext-mbstring Version *
ext-openssl Version *
The package kishor-rajbanshi/php-crypt contains the following files
Loading the files please wait ...