php8.5
Home/ Manual/ driver / clientencryption/ MongoDB\Driver\ClientEncryption::decrypt

MongoDB\Driver\ClientEncryption::decrypt

PHP function Edit on GitHub ✎

(mongodb >=1.7.0)

Decrypt a value

Description

MongoDB\Driver\ClientEncryption::decrypt(MongoDB\BSON\Binary $value): mixed

Decrypts the value.

Parameters

value

A MongoDB\BSON\Binary instance with subtype 6 containing the encrypted value.

Return Values

Returns the decrypted value as it was passed to MongoDB\Driver\ClientEncryption::encrypt().

Errors/Exceptions

  • Throws MongoDB\Driver\Exception\EncryptionException if an error occurs while decrypting the value

See Also

Source: reference/mongodb/mongodb/driver/clientencryption/decrypt.xml · from the official PHP manual (php/doc-en)