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
valueA
MongoDB\BSON\Binaryinstance 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\EncryptionExceptionif an error occurs while decrypting the value