Hashing, encoding and basic security · 14 / 15 Exercise Medium

Identifiers with UUID

Objective

A UUID is a practically unique 128-bit identifier. Version 4 ones are random; version 5 ones (uuid5) are computed with a hash from a namespace and a name, so the same name always gives the same UUID.

Instructions

  • The first line has the number n of names; each one is a line.
  • For each name show its uuid5 with the namespace uuid.NAMESPACE_DNS, a space and v (for example v5).
Input
2
python.org
python.org
Output
886313e1-3b8a-5372-9b90-0c9aee199e5d v5
886313e1-3b8a-5372-9b90-0c9aee199e5d v5

Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.

Start exercise