Decrypt the string.

Twine\Str::decrypt( string $key, [ string $cipher = 'AES-128-CBC' ] ) : Twine\Str

Parameters

$key The key for decrypting
$cipher The cipher method

Supported cipher methods:

  • AES-128-CBC
  • AES-256-CBC

Examples

$string = new Twine\Str('$DZpEm9ZFec9ybxF7$y2rc62EapV8p+xOKGaQHKA==$pKe7S3T7tf8jaXWpUHc=');

        $string->decrypt('secret'); // Returns 'john pinkerton'