--TEST-- MongoDB\Driver\ClientEncryption::encrypt() --SKIPIF-- createClientEncryption([ 'keyVaultNamespace' => CSFLE_KEY_VAULT_NS, 'kmsProviders' => ['local' => ['key' => new MongoDB\BSON\Binary(CSFLE_LOCAL_KEY, 0)]], ]); $keyId = $clientEncryption->createDataKey('local'); var_dump($clientEncryption->encrypt('top-secret', ['keyId' => $keyId, 'algorithm' => MongoDB\Driver\ClientEncryption::AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC])); ?> ===DONE=== --EXPECTF-- object(MongoDB\BSON\Binary)#%d (%d) { ["data"]=> string(82) "%a" ["type"]=> int(6) } ===DONE===