\CryptoManana\Core\Interfaces\MessageEncryptionObjectEncryptionInterface

Interface ObjectEncryptionInterface - Interface for object encryption/decryption.

Summary

Methods
Constants
encryptObject()
decryptObject()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

encryptObject()

encryptObject(object|\stdClass  $object) : string

Encrypts the serialized value of the given object.

Parameters

object|\stdClass $object

The object for encryption.

Throws

\Exception

Validation errors.

Returns

string —

The encrypted serialized object as a string.

decryptObject()

decryptObject(string  $cipherData) : object|\stdClass

Decrypts the encrypted value of the given object.

Parameters

string $cipherData

The encrypted serialized object as a string.

Throws

\Exception

Validation errors.

Returns

object|\stdClass —

The decrypted and unserialized object.