Lines Matching refs:opts

551      * An algorithm and iteration count should be given in the opts array.
561 * @param array $opts ('algo' => hash algorithm, 'iter' => iterations)
565 public function hash_seafilepbkdf2($clear, $salt = null, $opts = [])
568 if (empty($opts['algo'])) {
571 $prefixalgo = $opts['algo'];
574 if (empty($opts['iter'])) {
577 $iter = (int) $opts['iter'];
593 * An algorithm and iteration count should be given in the opts array.
598 * @param array $opts ('algo' => hash algorithm, 'iter' => iterations)
602 public function hash_djangopbkdf2($clear, $salt = null, $opts = [])
605 if (empty($opts['algo'])) {
608 $algo = $opts['algo'];
610 if (empty($opts['iter'])) {
613 $iter = (int) $opts['iter'];
631 * @param array $opts ('iter' => iterations)
635 public function hash_djangopbkdf2_sha256($clear, $salt = null, $opts = [])
637 $opts['algo'] = 'sha256';
638 return $this->hash_djangopbkdf2($clear, $salt, $opts);
646 * @param array $opts ('iter' => iterations)
650 public function hash_djangopbkdf2_sha1($clear, $salt = null, $opts = [])
652 $opts['algo'] = 'sha1';
653 return $this->hash_djangopbkdf2($clear, $salt, $opts);
700 * @param array $opts ('rounds' => rounds for sha256/sha512, 'prefix' => selected method from SHA-2 family)
704 public function hash_sha2($clear, $salt = null, $opts = [])
706 if (empty($opts['prefix'])) {
709 $prefix = $opts['prefix'];
711 if (empty($opts['rounds'])) {
714 $rounds = $opts['rounds'];
731 public function hash_sha512($clear, $salt = null, $opts = [])
733 $opts['prefix'] = 6;
734 return $this->hash_sha2($clear, $salt, $opts);
738 public function hash_sha256($clear, $salt = null, $opts = [])
740 $opts['prefix'] = 5;
741 return $this->hash_sha2($clear, $salt, $opts);