PHP Trait Psr7Middlewares\Utils\CryptTrait

Show file Open project: oscarotero/psr7-middlewares

Public Methods

Method Description
key ( string $key ) : self Set the keys to encrypt and authenticate.

Private Methods

Method Description
checkKey ( ) Check whether the key exists or not.
decrypt ( string $value ) : string Decrypt the given value.
encrypt ( string $value ) : string Encrypt the given value.
hkdf ( string $ikm, string $info = '' ) : string Get derived key http://tools.ietf.org/html/rfc5869.
secureRandomKey ( ) : string | null Generate a secure random key.

Method Details

key() public method

Set the keys to encrypt and authenticate.
public key ( string $key ) : self
$key string The binary key
return self