Overview

Namespaces

  • PHP
  • PHPassLib
    • Application
    • Exception
    • Hash
    • Test
      • Application
      • Hash

Classes

  • Loader
  • Utilities

Interfaces

  • Exception
  • Hash
  • Overview
  • Namespace
  • Class
  • Tree

Interface Hash

Hashing Module Interface

Direct known implementers

PHPassLib\Hash\BCrypt, PHPassLib\Hash\BSDiCrypt, PHPassLib\Hash\DESCrypt, PHPassLib\Hash\MD5Crypt, PHPassLib\Hash\PBKDF2, PHPassLib\Hash\Portable, PHPassLib\Hash\SHA1Crypt, PHPassLib\Hash\SHA256Crypt, PHPassLib\Hash\SHA512Crypt
Namespace: PHPassLib
Package: PHPassLib\Hashes
Copyright: Copyright (c) 2012, Ryan Chouinard
License: License - http://www.opensource.org/licenses/mit-license.php
Author: Ryan Chouinard <rchouinard@gmail.com>
Located at src/PHPassLib/Hash.php
Methods summary
public static string
# genConfig( array $config = array () )

Generate a config string from an array.

Generate a config string from an array.

Parameters

$config
array
$config Array of configuration options.

Returns

string
Configuration string.

Throws

InvalidArgumentException
Throws an InvalidArgumentException if any passed-in configuration options are invalid.
public static array
# parseConfig( string $config )

Parse a config string into an array.

Parse a config string into an array.

Parameters

$config
string
$config Configuration string.

Returns

array
Array of configuration options or false on failure.
public static string
# genHash( string $password, string $config )

Generate a password hash using a config string.

Generate a password hash using a config string.

Parameters

$password
string
$password Password string.
$config
string
$config Configuration string.

Returns

string
Returns the hash string on success. On failure, one of *0 or *1 is returned.
public static string
# hash( string $password, string|array $config = array () )

Generate a password hash using a config string or array.

Generate a password hash using a config string or array.

Parameters

$password
string
$password Password string.
$config
string|array
$config Optional config string or array of options.

Returns

string
Returns the hash string on success. On failure, one of *0 or *1 is returned.
public static boolean
# verify( string $password, string $hash )

Verify a password against a hash string.

Verify a password against a hash string.

Parameters

$password
string
$password Password string.
$hash
string
$hash Hash string.

Returns

boolean
Returns true if the password matches, false otherwise.
PHP Password Library API documentation generated by ApiGen 2.8.0