Overview

Namespaces

  • CJPGDK
    • PhpHttpAuth
      • Database
      • Hash
  • PHP

Traits

  • Apr1Md5
  • Bcrypt
  • Md5
  • Sha
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

Trait Apr1Md5

Provides PHP methods for APR1-MD5 hashing

Direct Known Users

CJPGDK\PhpHttpAuth\HttpAuth
Namespace: CJPGDK\PhpHttpAuth\Hash
Package: CJPGDK\PhpHttpAuth
Author: Christian M. Jensen cmj@cjpg.dk
Version: 1.0.0
Since: 1.0.0
Located at src/CJPGDK/PhpHttpAuth/Hash/Apr1Md5.php
Methods summary
public string
# getApr1Md5HtpasswdRow( array|string $user, null|string $hashedpwd = null )

format username and password array to a '.htpasswd' line

format username and password array to a '.htpasswd' line

Parameters

$user
as array ['username' => , 'password'=>], or a user name with passwd
$hashedpwd

Returns

string
public array
# createUserApr1Md5( string $user, string $pwd )

Create a user and password row.

Create a user and password row.

Parameters

$user
$pwd

Returns

array
['username' => , 'password'=>]
public string
# getApr1Md5Hash( string $plainpasswd, string $salt = null )

Get an apr1 md5 hash

Get an apr1 md5 hash

Parameters

$plainpasswd
$salt

Returns

string
public boolean
# matchApr1Md5Hash( string $plain, string $hash )

Validate an apr1 md5 hash

Validate an apr1 md5 hash

Parameters

$plain
$hash

Returns

boolean
PhpHttpAuth API documentation generated by ApiGen