\CryptoManana\Core\Traits\MessageEncryptionObjectSigningTrait

Trait ObjectSigningTrait - Reusable implementation of `ObjectSigningInterface`.

Summary

Methods
Properties
Constants
signObject()
verifyObjectSignature()
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

signObject()

signObject(object|\stdClass  $object) : string

Generates a signature of the given object.

Parameters

object|\stdClass $object

The object for signing.

Throws

\Exception

Validation errors.

Returns

string —

The signature data.

verifyObjectSignature()

verifyObjectSignature(string  $signatureData, object|\stdClass  $object) : boolean

Verifies that the signature is correct for the given object.

Parameters

string $signatureData

The signature input string.

object|\stdClass $object

The object used for signing.

Throws

\Exception

Validation errors.

Returns

boolean —

The verification result.