3 * An abstract implementation of some standard key derivation needs
7 * @category PHPCryptLib
9 * @subpackage Derivation
10 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
11 * @copyright 2011 The Authors
12 * @license http://www.opensource.org/licenses/mit-license.html MIT License
13 * @version Build @@version@@
16 namespace CryptLib\Key\Derivation
;
19 * An abstract implementation of some standard key derivation needs
21 * @category PHPCryptLib
23 * @subpackage Derivation
24 * @author Anthony Ferrara <ircmaxell@ircmaxell.com>
26 abstract class AbstractDerivation
{
29 * @var Hash A hashing algorithm to use for the derivation
31 protected $hash = null;
34 * @var array An array of options for the key derivation function
36 protected $options = array(
41 * Construct the derivation instance
43 * @param array $options An array of options to set for this instance
47 public function __construct(array $options = array()) {
48 $this->options
= $options +
$this->options
;
49 $this->hash
= $this->options
['hash'];