def re_encrypt(ciphertext_blob, destination_key_id, source_encryption_context=None, destination_encryption_context=None, grant_tokens=None, region=None, key=None, keyid=None, profile=None):
 conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)
 r = {}
 try:
  ciphertext = conn.re_encrypt(ciphertext_blob, destination_key_id, source_encryption_context, destination_encryption_context, grant_tokens)
  r['ciphertext'] = ciphertext
 except boto.exception.BotoServerError as e:
  r['error'] = __utils__['boto.get_error'](e)
 return r

def re_encrypt ( ciphertext_blob , destination_key_id , source_encryption_context = None , destination_encryption_context = None , grant_tokens = None , region = None , key = None , keyid = None , profile = None ) : conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) r = { } try : ciphertext = conn . re_encrypt ( ciphertext_blob , destination_key_id , source_encryption_context , destination_encryption_context , grant_tokens ) r [ 'ciphertext' ] = ciphertext except boto . exception . BotoServerError as e : r [ 'error' ] = __utils__ [ 'boto.get_error' ] ( e ) return r
reencrypt encrypted data with a new master key .