IP : 18.119.213.129Hostname : host45.registrar-servers.comKernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64Disable Function : None :) OS : Linux
PATH:
/
home/
../
var/
softaculous/
pier/
../
monsta/
../
nucleus/
../
punbb/
../
modx/
modpbkdf2.class.php/
/
<?php /** * This file contains a modHash implementation of RSA PDKDF2. * @package modx * @subpackage hashing */
/** * A PBKDF2 implementation of modHash. * * {@inheritdoc} * * @package modx * @subpackage hashing */
class modPBKDF2 extends modHash { /** * Generate a hash of a string using the RSA PBKDFA2 specification. * * The following options are available: * - salt (required): a valid, non-empty string to salt the hashes * - iterations: the number of iterations per block, default is 1000 (< 1000 not recommended) * - derived_key_length: the size of the derived key to generate, default is 32 * - algorithm: the hash algorithm to use, default is sha256 * - raw_output: if true, returns binary output, otherwise derived key is base64_encode()'d; default is false * * @param string $string A string to generate a secure hash from. * @param array $options An array of options to be passed to the hash implementation. * @return mixed The hash result or false on failure. */ public function hash($string, array $options = array()) { $derivedKey = false; $salt = $this->getOption('salt', $options, false); if (is_string($salt) && strlen($salt) > 0) { $iterations = (integer) $this->getOption('iterations', $options, 1000); $derivedKeyLength = (integer) $this->getOption('derived_key_length', $options, 32); $algorithm = $this->getOption('algorithm', $options, 'sha256');