MongoDB\Driver\ClientEncryption::getKeyByAltName
PHP function
Edit on GitHub ✎
(mongodb >=1.15.0)
Gets a key document by an alternate name
Description
MongoDB\Driver\ClientEncryption::getKeyByAltName(string $keyAltName): object|null
Finds a single key document in the key vault collection with the given alternate name keyAltName.
Parameters
keyAltNameAlternate name for the key document.
Return Values
Returns the key document, or null if no document matched.
Errors/Exceptions
- Throws
MongoDB\Driver\Exception\RuntimeExceptionon other errors.