\CryptoManana\Core\Traits\MessageDigestionObjectHashingTrait

Trait ObjectHashingTrait - Reusable implementation of `ObjectHashingInterface`.

Summary

Methods
Properties
Constants
hashData()
hashObject()
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.

hashObject()

hashObject(object|\stdClass  $object) : string

Calculates a hash value for the serialized value of the given object.

Parameters

object|\stdClass $object

The object for hashing.

Throws

\Exception

Validation errors.

Returns

string —

The digest.