\CryptoManana\Core\Traits\MessageEncryptionFileSigningTrait

Trait FileSigningTrait - Reusable implementation of `FileSigningInterface`.

Summary

Methods
Properties
Constants
signFile()
verifyFileSignature()
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

signFile()

signFile(string  $filename) : string

Generates a signature of a given plain file.

Parameters

string $filename

The full path and name of the file for signing.

Throws

\Exception

Validation errors.

Returns

string —

The signature data.

verifyFileSignature()

verifyFileSignature(string  $signatureData, string  $filename) : boolean

Verifies that the signature is correct for a given plain file.

Parameters

string $signatureData

The signature input string.

string $filename

The full path and name of the file for signing.

Throws

\Exception

Validation errors.

Returns

boolean —

The verification result.