Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _keyset_info(keyset: tink_pb2.Keyset) -> tink_pb2.KeysetInfo:
keyset_info = tink_pb2.KeysetInfo(primary_key_id=keyset.primary_key_id)
for key in keyset.key:
key_info = keyset_info.key_info.add()
key_info.type_url = key.key_data.type_url
key_info.status = key.status
key_info.output_prefix_type = key.output_prefix_type
key_info.key_id = key.key_id
return keyset_info