Skip to content

tools

django_spire.api.tools

hash_string

Source code in django_spire/api/tools.py
def hash_string(value: str) -> str:
    return hmac.new(settings.SECRET_KEY.encode(), value.encode(), hashlib.sha256).hexdigest()