We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8155b0d commit 99fd732Copy full SHA for 99fd732
pydatastructs/graphs/graph.py
@@ -17,7 +17,10 @@ def get_secret_key():
17
secret_key = os.getenv("HMAC_SECRET_KEY")
18
if secret_key is None:
19
raise RuntimeError("Secret key is missing!")
20
- return secret_key.encode()
+ return secret_key.encode()
21
+def generate_hmac(data):
22
+ """Generating HMAC signature for integrity verification"""
23
+ return hmac.new(get_secret_key(), data.encode(),hashlib.sha256).haxdigit()
24
__all__ = [
25
'Graph'
26
]
0 commit comments