K2hash::addAttr K2hash Class K2hash::addAttrPluginLib

K2hash::addAttrCryptPass

Adds the password to encrypt values

Description

public bool K2hash::addAttrCryptPass ( string $encpass [, bool $is_default_encrypt ] )

Adds the password to encrypt values. The encrption algorithm is AES256.

Parameters

Return Values

Returns true on success or false on failure.

Examples

<?php
$k2hash = new K2hash();
$k2hash->openMem();
var_dump($k2hash->addAttrCryptPass("testkey", true));
$k2hash->close();
?>

The above example will output:

bool(true)

See Also

K2hash::addAttr K2hash Class K2hash::addAttrPluginLib