File: src/Contract/PasswordInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  Halite  >  src/Contract/PasswordInterface.php  >  Download  
File: src/Contract/PasswordInterface.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Halite
Perform cryptography operations with libsodium
Author: By
Last change: For version 2, let's use strict types!
Date: 5 years ago
Size: 844 bytes



Class file image Download
namespace ParagonIE\Halite\Contract;

use \

 * Hash then encrypt
interface PasswordInterface
     * Hash then encrypt a password
     * @param string $password - The user's password
     * @param EncryptionKey $secret_key - The master key for all passwords
     * @return string
public static function hash(string $password, KeyInterface $secret_key): string;
     * Decrypt then verify a password
     * @param string $password - The user-provided password
     * @param string $stored - The encrypted password hash
     * @param EncryptionKey $secret_key - The master key for all passwords
     * @return boolean
public static function verify(string $password, string $stored, KeyInterface $secret_key): bool;

For more information send a message to info at phpclasses dot org.