()
| 115 | |
| 116 | |
| 117 | def 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 | |
| 129 | def get_unix_ms() -> int: |
no test coverage detected