Lines Matching defs:opts

554      * An algorithm and iteration count should be given in the opts array.
564 * @param array $opts ('algo' => hash algorithm, 'iter' => iterations)
568 public function hash_seafilepbkdf2($clear, $salt = null, $opts = [])
571 if (empty($opts['algo'])) {
574 $prefixalgo = $opts['algo'];
577 if (empty($opts['iter'])) {
580 $iter = (int) $opts['iter'];
596 * An algorithm and iteration count should be given in the opts array.
601 * @param array $opts ('algo' => hash algorithm, 'iter' => iterations)
605 public function hash_djangopbkdf2($clear, $salt = null, $opts = [])
608 if (empty($opts['algo'])) {
611 $algo = $opts['algo'];
613 if (empty($opts['iter'])) {
616 $iter = (int) $opts['iter'];
634 * @param array $opts ('iter' => iterations)
638 public function hash_djangopbkdf2_sha256($clear, $salt = null, $opts = [])
640 $opts['algo'] = 'sha256';
641 return $this->hash_djangopbkdf2($clear, $salt, $opts);
649 * @param array $opts ('iter' => iterations)
653 public function hash_djangopbkdf2_sha1($clear, $salt = null, $opts = [])
655 $opts['algo'] = 'sha1';
656 return $this->hash_djangopbkdf2($clear, $salt, $opts);
718 * @param array $opts ('rounds' => rounds for sha256/sha512, 'prefix' => selected method from SHA-2 family)
722 public function hash_sha2($clear, $salt = null, $opts = [])
724 if (empty($opts['prefix'])) {
727 $prefix = $opts['prefix'];
729 if (empty($opts['rounds'])) {
732 $rounds = $opts['rounds'];
749 public function hash_sha512($clear, $salt = null, $opts = [])
751 $opts['prefix'] = 6;
752 return $this->hash_sha2($clear, $salt, $opts);
756 public function hash_sha256($clear, $salt = null, $opts = [])
758 $opts['prefix'] = 5;
759 return $this->hash_sha2($clear, $salt, $opts);