lib/mongo/client_encryption.rb
def create_data_key(kms_provider, options={})
      @encrypter.create_and_insert_data_key(
        kms_provider,
        options
      )
    end
# Generates a data key used for encryption/decryption and stores
# that key in the KMS collection. The generated key is encrypted with
# the KMS master key.
#
# @param [ String ] kms_provider The KMS provider to use. Valid values are
#   "aws" and "local".
# @param [ Hash ] options
#
# @option options [ Hash ] :master_key Information about the AWS master key.
#   Required if kms_provider is "aws".
#   - :region [ String ] The The AWS region of the master key (required).
#   - :key [ String ] The Amazon Resource Name (ARN) of the master key (required).
#   - :endpoint [ String ] An alternate host to send KMS requests to (optional).
#     endpoint should be a host name with an optional port number separated
#     by a colon (e.g. "kms.us-east-1.amazonaws.com" or
#     "kms.us-east-1.amazonaws.com:443"). An endpoint in any other format
#     will not be properly parsed.
# @option options [ Array<String> ] :key_alt_names An optional array of
#   strings specifying alternate names for the new data key.
#
# @return [ BSON::Binary ] The 16-byte UUID of the new data key as a
#   BSON::Binary object with type :uuid.
Generates a data key used for encryption/decryption and stores
that key in the KMS collection. The generated key is encrypted with
the KMS master key.
Generates a data key used for encryption / decryption and stores that key in the KMS collection . The generated key is encrypted with the KMS master key .
def create_data_key(kms_provider, options={})
      @encrypter.create_and_insert_data_key(
        kms_provider,
        options
      )
    end
def create_data_key ( kms_provider , options = { } ) @encrypter . create_and_insert_data_key ( kms_provider , options ) end
Generates a data key used for encryption/decryption and stores
that key in the KMS collection.
Generates a data key used for encryption / decryption and stores that key in the KMS collection .
The 16-byte UUID of the new data key as a BSON::Binary object with type :uuid.
The 16 - byte UUID of the new data key as a BSON :: Binary object with type : uuid .
 BSON::Binary 
kms_provider
options
:key_alt_names An optional array of strings specifying alternate names for the new data key.
: key_alt_names An optional array of strings specifying alternate names for the new data key .
None