# MongoDB\Driver\ClientEncryption::decrypt

(mongodb >=1.7.0)

MongoDB\Driver\ClientEncryption::decrypt — Decrypt a value

### Descripción

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

Decrypts the value.

### Parámetros

`value`

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

### Valores devueltos

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

### Errores/Excepciones

- Lanza una MongoDB\Driver\Exception\InvalidArgumentException en errores de análisis de argumentos.
- Throws MongoDB\Driver\Exception\EncryptionException if an error occurs while decrypting the value

### Ver también

- MongoDB\Driver\ClientEncryption::encrypt() - Encrypt a value