hash string function
This commit is contained in:
parent
607c64351f
commit
afe64aaada
8
src/string.py
Normal file
8
src/string.py
Normal file
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user