\CryptoManana\Core\Traits\MessageDigestionDigestionFormatsTrait

Trait DigestionFormatsTrait - Reusable implementation of `DigestionFormatsInterface`.

Summary

Methods
Properties
Constants
setDigestFormat()
getDigestFormat()
$$digestFormat
No constants found
changeOutputFormat()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$$digestFormat

$$digestFormat : integer

The digest output format property storage.

Type

integer

Methods

setDigestFormat()

setDigestFormat(integer  $digestFormat) : $this

Setter for the digest format code property.

Parameters

integer $digestFormat

The digest format code.

Throws

\Exception

Validation errors.

Returns

$this —

The hash algorithm object.

getDigestFormat()

getDigestFormat() : integer

Getter for the digest format code property.

Returns

integer —

The digest format code.

changeOutputFormat()

changeOutputFormat(string  $digest) : string

Internal method for converting the digest's output format representation via the chosen format.

Parameters

string $digest

The output digest.

Returns

string —

The input data with proper salting.