MongoDB\Driver\ClientEncryption::getKey
PHP function
Edit on GitHub ✎
(mongodb >=1.15.0)
Gets a key document
Description
MongoDB\Driver\ClientEncryption::getKey(MongoDB\BSON\Binary $keyId): object|null
Finds a single key document in the key vault collection with the given UUID keyId.
Parameters
keyIdA
MongoDB\BSON\Binaryinstance with subtype 4 (UUID) identifying the key document.
Return Values
Returns the key document, or null if no document matched.
Errors/Exceptions
- Throws
MongoDB\Driver\Exception\RuntimeExceptionon other errors.