parameters: (cls, key_template: tink_pb2.KeyTemplate)
return_statement: return cls._create(keyset)
docstring: Return a new KeysetHandle.
  
      It contains a single fresh key generated according to key_template.
  
      Args:
        key_template: A tink_pb2.KeyTemplate object.
  
      Returns:
        A new KeysetHandle.
docstring_summary: Return a new KeysetHandle.
docstring_tokens: Return a new KeysetHandle .
function: def generate_new(cls, key_template: tink_pb2.KeyTemplate) -> 'KeysetHandle':
      """Return a new KeysetHandle.
  
      It contains a single fresh key generated according to key_template.
  
      Args:
        key_template: A tink_pb2.KeyTemplate object.
  
      Returns:
        A new KeysetHandle.
      """
      keyset = tink_pb2.Keyset()
      key_data = core.Registry.new_key_data(key_template)
      key_id = _generate_unused_key_id(keyset)
      key = keyset.key.add()
      key.key_data.CopyFrom(key_data)
      key.status = tink_pb2.ENABLED
      key.key_id = key_id
      key.output_prefix_type = key_template.output_prefix_type
      keyset.primary_key_id = key_id
      return cls._create(keyset)
function_tokens: def generate_new ( cls , key_template : tink_pb2 . KeyTemplate ) -> 'KeysetHandle' : keyset = tink_pb2 . Keyset ( ) key_data = core . Registry . new_key_data ( key_template ) key_id = _generate_unused_key_id ( keyset ) key = keyset . key . add ( ) key . key_data . CopyFrom ( key_data ) key . status = tink_pb2 . ENABLED key . key_id = key_id key . output_prefix_type = key_template . output_prefix_type keyset . primary_key_id = key_id return cls . _create ( keyset )