https://github.com/deemru/cryptash
Hash-based encrypt/decrypt for PHP
https://github.com/deemru/cryptash
authenticity confidentiality cryptography decrypt encrypt integrity php
Last synced: about 2 months ago
JSON representation
Hash-based encrypt/decrypt for PHP
- Host: GitHub
- URL: https://github.com/deemru/cryptash
- Owner: deemru
- License: mit
- Created: 2019-01-13T12:15:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T21:46:29.000Z (7 months ago)
- Last Synced: 2025-03-20T13:07:25.985Z (2 months ago)
- Topics: authenticity, confidentiality, cryptography, decrypt, encrypt, integrity, php
- Language: PHP
- Homepage: https://packagist.org/packages/deemru/cryptash
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cryptash
[](https://packagist.org/packages/deemru/cryptash) [](https://packagist.org/packages/deemru/cryptash) [](https://github.com/deemru/Cryptash/actions/workflows/php.yml) [](https://app.codacy.com/gh/deemru/Cryptash/files) [](https://packagist.org/packages/deemru/cryptash)
[Cryptash](https://github.com/deemru/Cryptash) implements hash based encryption with user-defined size of [IV](https://en.wikipedia.org/wiki/Initialization_vector) and [MAC](https://en.wikipedia.org/wiki/Message_authentication_code).
It is a pretty simple way to protect and verify your data transfers which goes outside.
## Usage
```php
$cryptash = new Cryptash( 'Password' );
$msg = 'Hello, world!';$encrypted = $cryptash->encryptash( $msg );
$decrypted = $cryptash->decryptash( $encrypted );if( $decrypted !== $msg )
exit( 1 );
```## Requirements
- [PHP](http://php.net) >=5.4
## Installation
Require through Composer:
```json
{
"require": {
"deemru/cryptash": "1.0.*"
}
}
```