Method: Mongo::ClientEncryption#encrypt
- Defined in:
- lib/mongo/client_encryption.rb
#encrypt(value, options = {}) ⇒ BSON::Binary
Note:
The :key_id and :key_alt_name options are mutually exclusive. Only one is required to perform explicit encryption.
Encrypts a value using the specified encryption key and algorithm.
if encryption algorithm is set to “Indexed”. Query type should be set
only if encryption algorithm is set to "Indexed". The only allowed
value is "equality".
119 120 121 |
# File 'lib/mongo/client_encryption.rb', line 119 def encrypt(value, ={}) @encrypter.encrypt(value, ) end |