\CryptoManana\Core\Traits\MessageDigestionRepetitiveHashingTrait

Trait RepetitiveHashingTrait - Reusable implementation of `RepetitiveHashingInterface`.

Summary

Methods
Properties
Constants
hashData()
repetitiveHashData()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

hashData()

hashData(string  $data) : string

Calculates a hash value for the given data.

Parameters

string $data

The input string.

Throws

\Exception

Validation errors.

Returns

string —

The digest.

repetitiveHashData()

repetitiveHashData(string  $data, integer  $iterations = 2) : string

Calculates a hash value for the given data via repetitive/recursive digestion.

Parameters

string $data

The input string.

integer $iterations

The number of internal iterations to perform.

Throws

\Exception

Validation errors.

Returns

string —

The digest.