Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
510 B
3
Indexable
Never
import os

def generate_private_keys(num_keys):
    private_keys = []
    for _ in range(num_keys):
        # Generate a random 256-bit number, which is a 64 character hexadecimal string
        private_key = os.urandom(32).hex()
        private_keys.append(private_key)
    return private_keys

# Example: Generate 5 Bitcoin private keys
num_keys_to_generate = 5
generated_keys = generate_private_keys(num_keys_to_generate)

# Print the generated keys
for key in generated_keys:
    print(key)
Leave a Comment