mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 11:17:53 +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()
|