Search by

zech86 / php-simple-encrypted-text

zech86

There is no license information available for the latest version (1.0.0) of this package.

This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.

Package info

github.com/zech86/php-simple-encrypted-text

pkg:composer/zech86/php-simple-encrypted-text

Statistics

Installs: 258

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2017-09-19 19:18 UTC

This package is not auto-updated.

Last update: 2022-02-05 14:14:57 UTC


README

php openssl (default) http://php.net/manual/en/book.openssl.php

php hash (default) http://php.net/manual/en/book.hash.php

Usage

<?php

/* @see http://php.net/manual/pt_BR/function.openssl-get-cipher-methods.php */
$cipher = 'AES-256-CFB8'; // default
$key = "my_secret";
$payload = 'my string';

$openssl = new OpenSSL($key, $cipher);
$encoded = $openssl->encode('my string');
$decoded = $openssl->decode($encoded);

var_dump($encoded); // encoded
var_dump($payload); // my string
var_dump($decoded); // my string

Composer Installation

composer require zech86/php-simple-encrypted-text