MCPcopy Create free account
hub / github.com/Freedium-cfd/web / generate_random_sha256_hash

Function generate_random_sha256_hash

medium-parser/medium_parser/utils.py:117–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115
116
117def generate_random_sha256_hash():
118 # Encode the input string to bytes before hashing
119 random_input_bytes = secrets.token_bytes()
120 # Create the SHA-256 hash object
121 sha256_hash = hashlib.sha256()
122 # Update the hash object with the input bytes
123 sha256_hash.update(random_input_bytes)
124 # Get the hexadecimal representation of the hash
125 sha256_hex = sha256_hash.hexdigest()
126 return sha256_hex
127
128
129def get_unix_ms() -> int:

Callers 1

query_post_graphqlMethod · 0.90

Calls 2

sha256Method · 0.80
updateMethod · 0.80

Tested by

no test coverage detected