diff options
author | Isis Lovecruft <isis@torproject.org> | 2013-04-15 19:31:01 +0000 |
---|---|---|
committer | Isis Lovecruft <isis@torproject.org> | 2013-04-15 19:31:01 +0000 |
commit | db49089b2f13d45a1f0fca5ae5cc52dfcc4eac2e (patch) | |
tree | 2a6a58474bc746ef152b167e209966222bdfad80 | |
parent | b86827df8d3db5ca87eb064f65886660426fa60f (diff) |
Update docstring for function alias_resolver.createUUID().
-rw-r--r-- | src/leap/mx/alias_resolver.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/leap/mx/alias_resolver.py b/src/leap/mx/alias_resolver.py index 8ab84e5..d8d4646 100644 --- a/src/leap/mx/alias_resolver.py +++ b/src/leap/mx/alias_resolver.py @@ -32,14 +32,16 @@ from leap.mx.util import net, log, config, exceptions def createUUID(alias): - """ - Creates Universal Unique ID by taking the SHA-1 HASH of an email alias: + """Creates Universal Unique ID by taking the SHA1 HASH of an email alias: + + >>> uuid.uuid5(uuid.NAMESPACE_URL, "isis@leap.se") + UUID('7194878e-4aea-563f-85a4-4f58519f3c4f') - >>> uuid.uuid5(uuid.NAMESPACE_URL, "isis@leap.se") - UUID('7194878e-4aea-563f-85a4-4f58519f3c4f') + TODO: Is there a commonly accepted way to check that an email address + is valid? - @param alias: An email address alias. - @returns: A :class:`uuid.UUID` containing attributes specifying the UUID. + :param str alias: An email address alias. + :returns: A :class:`uuid.UUID` containing attributes specifying the UUID. """ return uuid.uuid5(uuid.NAMESPACE_URL, str(alias)) |