Overview

Namespaces

  • CJPGDK
    • PhpHttpAuth
      • Database
      • Hash
  • PHP

Traits

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

Trait Sha

Provides PHP methods for SHA1 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/Sha.php
Methods summary
public string
# getShaHtpasswdRow( 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
# createUserSha( 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
# getShaHash( string $plainpasswd )

Get an sha hash

Get an sha hash

Parameters

$plainpasswd

Returns

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

Validate an sha hash

Validate an sha hash

Parameters

$plain
$hash

Returns

boolean
PhpHttpAuth API documentation generated by ApiGen