mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
10 lines
223 B
Python
10 lines
223 B
Python
"""Nightscout util functions."""
|
|
from __future__ import annotations
|
|
|
|
import hashlib
|
|
|
|
|
|
def hash_from_url(url: str) -> str:
|
|
"""Hash url to create a unique ID."""
|
|
return hashlib.sha256(url.encode("utf-8")).hexdigest()
|