For details on specific methods, including syntax and examples, click on the specific method to go to its reference page.有关特定方法的详细信息,包括语法和示例,请单击特定方法以转到其参考页面。
The mongo客户端字段级加密方法要求数据库连接启用客户端字段级的加密。mongo
client-side field level encryption methods require a database connection with client-side field level encryption enabled. If the current database connection was not initiated with client-side field level encryption enabled, either:如果当前数据库连接未在启用客户端字段级加密的情况下启动,请执行以下任一操作:
Use the 使用Mongo shell中的Mongo()
constructor from the mongo
shell to establish a connection with the required client-side field level encryption options. Mongo()
构造函数建立与所需客户端字段级加密选项的连接。The Mongo()
method supports the following Key Management Service (KMS) providers for Customer Master Key (CMK) management:Mongo()
方法支持以下用于客户主密钥(CMK)管理的密钥管理服务(KMS)提供程序:
or或
mongo
shell command line options to establish a connection with the required options. mongo
shell命令行选项建立与所需选项的连接。The following methods are for 以下方法仅适用于mongosh
only. mongosh
。For instructions on implementing client-side field level encryption using a MongoDB 4.2+ compatible driver, defer to the driver documentation. 有关使用MongoDB 4.2+兼容驱动程序实现客户端字段级加密的说明,请参阅驱动程序文档。See Driver Compatibility Table for a complete list of 4.2+ compatible drivers with support for client-side field level encryption.有关支持客户端字段级加密的4.2+兼容驱动程序的完整列表,请参阅驱动程序兼容性表。
getKeyVault() | |
KeyVault.createKey() | |
KeyVault.deleteKey() | |
KeyVault.getKey() | |
KeyVault.getKeys() | |
KeyVault.addKeyAlternateName() | |
KeyVault.removeKeyAlternateName() | |
KeyVault.getKeyByAltName() | |
getClientEncryption() | |
ClientEncryption.encrypt() | |
ClientEncryption.decrypt() |