\CryptoManana\Core\Traits\MessageDigestionFileHashingTrait

Trait FileHashingTrait - Reusable implementation of `FileHashingInterface`.

Summary

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

Methods

hashFile()

hashFile(string  $filename) : string

Calculates a hash value for the content of the given filename and location.

Parameters

string $filename

The full path and name of the file for hashing.

Throws

\Exception

Validation errors.

Returns

string —

The digest.

isFileSaltingForcingNativeHashing()

isFileSaltingForcingNativeHashing() : boolean

Internal method for checking if native file hashing should be used by force.

Returns

boolean —

Is native hashing needed for the current salting mode.