diff --git a/src/string.py b/src/string.py new file mode 100644 index 0000000..8c73a78 --- /dev/null +++ b/src/string.py @@ -0,0 +1,8 @@ +#! /usr/bin/env python3 +# vim:fenc=utf-8 +from hashlib import sha256 + +def hash_string(string: str) -> str: + return sha256(string.encode('utf-8'), + usedforsecurity=False).hexdigest() +