123456789_123456789_123456789_123456789_123456789_

Module: Mongo::Crypt::KMS

Class Method Summary

Class Method Details

.provider_base_type(identifier) ⇒ String

Returns the base provider type from a KMS provider identifier. For example, "aws:name1" returns "aws" and :aws returns "aws".

Parameters:

  • identifier (String | Symbol)

    The KMS provider identifier.

Returns:

  • (String)

    The base provider type.

[ GitHub ]

  
# File 'lib/mongo/crypt/kms.rb', line 33

def self.provider_base_type(identifier)
  identifier.to_s.split(':').first
end