--TEST-- MongoDB\Driver\ClientEncryption::decrypt() --SKIPIF-- --FILE-- createClientEncryption(['keyVaultNamespace' => 'default.keys', 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary($key, 0)]]]); $key = $clientEncryption->createDataKey('local'); $encrypted = $clientEncryption->encrypt('top-secret', ['keyId' => $key, 'algorithm' => MongoDB\Driver\ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC]); var_dump($clientEncryption->decrypt($encrypted)); ?> ===DONE=== --EXPECTF-- string(10) "top-secret" ===DONE===