class Hash (View source)

Class providing hash algorithms

Methods

static string
getAlgorithms(bool $aliases = false, string $prefix = null)

Returns hash algorithms

static bool
hasAlgorithm(string $algorithm)

Finds out whether algorithm exists

static 
__callStatic(string $name, array $arguments)

Hash magic method for calling static methods

__construct(string $algorithm)

Hash constructor

string
getAlgorithmName()

Returns hash algorithm string

null
update(string $data)

Updates hash

string
digest()

Return hash digest in raw foramt

string
hexdigest()

Return hash digest in hex format

int
getBlockSize()

Returns hash block size

int
getSize()

Returns hash size

Details

static string getAlgorithms(bool $aliases = false, string $prefix = null)

Returns hash algorithms

Parameters

bool $aliases
string $prefix

Return Value

string

static bool hasAlgorithm(string $algorithm)

Finds out whether algorithm exists

Parameters

string $algorithm

Return Value

bool

static __callStatic(string $name, array $arguments)

Hash magic method for calling static methods

Parameters

string $name
array $arguments

__construct(string $algorithm)

Hash constructor

Parameters

string $algorithm

string getAlgorithmName()

Returns hash algorithm string

Return Value

string

null update(string $data)

Updates hash

Parameters

string $data

Return Value

null

string digest()

Return hash digest in raw foramt

Return Value

string

string hexdigest()

Return hash digest in hex format

Return Value

string

int getBlockSize()

Returns hash block size

Return Value

int

int getSize()

Returns hash size

Return Value

int