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 244d2de commit ee5b1bfCopy full SHA for ee5b1bf
blockchain/merkle_tree.py
@@ -15,7 +15,19 @@
15
16
17
def sha256(data: str) -> str:
18
- """Compute SHA-256 hash of a string."""
+ """
19
+ Compute the SHA-256 hash of the given string.
20
+
21
+ Args:
22
+ data (str): Input string.
23
24
+ Returns:
25
+ str: Hexadecimal SHA-256 hash of the input.
26
27
+ Example:
28
+ >>> sha256("abc")
29
+ 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad'
30
31
return hashlib.sha256(data.encode()).hexdigest()
32
33
0 commit comments