parameters: (self, key_id, plaintext, encryption_context=None,
                  grant_tokens=None)
return_statement: return response
docstring: Encrypts plaintext into ciphertext by using a customer master
          key.
  
          :type key_id: string
          :param key_id: Unique identifier of the customer master. This can be an
              ARN, an alias, or the Key ID.
  
          :type plaintext: blob
          :param plaintext: Data to be encrypted.
  
          :type encryption_context: map
          :param encryption_context: Name:value pair that specifies the
              encryption context to be used for authenticated encryption. For
              more information, see `Authenticated Encryption`_.
  
          :type grant_tokens: list
          :param grant_tokens: A list of grant tokens that represent grants which
              can be used to provide long term permissions to perform encryption.
docstring_summary: Encrypts plaintext into ciphertext by using a customer master
          key.
docstring_tokens: Encrypts plaintext into ciphertext by using a customer master key .
function: def encrypt(self, key_id, plaintext, encryption_context=None,
                  grant_tokens=None):
          """
          Encrypts plaintext into ciphertext by using a customer master
          key.
  
          :type key_id: string
          :param key_id: Unique identifier of the customer master. This can be an
              ARN, an alias, or the Key ID.
  
          :type plaintext: blob
          :param plaintext: Data to be encrypted.
  
          :type encryption_context: map
          :param encryption_context: Name:value pair that specifies the
              encryption context to be used for authenticated encryption. For
              more information, see `Authenticated Encryption`_.
  
          :type grant_tokens: list
          :param grant_tokens: A list of grant tokens that represent grants which
              can be used to provide long term permissions to perform encryption.
  
          """
          if not isinstance(plaintext, six.binary_type):
              raise TypeError(
                  "Value of argument ``plaintext`` "
                  "must be of type %s." % six.binary_type)
          plaintext = base64.b64encode(plaintext)
          params = {'KeyId': key_id, 'Plaintext': plaintext, }
          if encryption_context is not None:
              params['EncryptionContext'] = encryption_context
          if grant_tokens is not None:
              params['GrantTokens'] = grant_tokens
          response = self.make_request(action='Encrypt',
                                       body=json.dumps(params))
          if response.get('CiphertextBlob') is not None:
              response['CiphertextBlob'] = base64.b64decode(
                  response['CiphertextBlob'].encode('utf-8'))
          return response
function_tokens: def encrypt ( self , key_id , plaintext , encryption_context = None , grant_tokens = None ) : if not isinstance ( plaintext , six . binary_type ) : raise TypeError ( "Value of argument ``plaintext`` " "must be of type %s." % six . binary_type ) plaintext = base64 . b64encode ( plaintext ) params = { 'KeyId' : key_id , 'Plaintext' : plaintext , } if encryption_context is not None : params [ 'EncryptionContext' ] = encryption_context if grant_tokens is not None : params [ 'GrantTokens' ] = grant_tokens response = self . make_request ( action = 'Encrypt' , body = json . dumps ( params ) ) if response . get ( 'CiphertextBlob' ) is not None : response [ 'CiphertextBlob' ] = base64 . b64decode ( response [ 'CiphertextBlob' ] . encode ( 'utf-8' ) ) return response