for instance this sentence ("Hi this is satoshi nakamoto comb") is 32 byte long and can be represented as "10f0c810a0c56a1282574ce4bf9d3e843afc5be688c277ab75e6da1e6f95d756" in base16 or "Kwne8vNfRRiq8d6CB6YpCtbK6EKCRyoCjPGomLshKgubBWwiDQWD" in base58 WIF.
private_key_static = binascii.hexlify("Hi this is satoshi nakamoto comb")
print (private_key_static)
Hex should be:
48692074686973206973207361746f736869206e616b616d6f746f20636f6d62extended_key = "80"+private_key_static
# Step 3: first SHA-256
first_sha256 = hashlib.sha256(binascii.unhexlify(extended_key)).hexdigest()
# Step 4: second SHA-256
second_sha256 = hashlib.sha256(binascii.unhexlify(first_sha256)).hexdigest()
# Step 5-6: add checksum to end of extended key
final_key = extended_key+second_sha256[:8]
# Step 7: finally the Wallet Import Format is the base 58 encode of final_key
WIF = b58encode(binascii.unhexlify(final_key))
print (WIF)
Hi this is satoshi nakamoto comb -
5JNBDPYj437L1JAPVQ2ngwTuh1GUboCUef5yh5cpYzauLTTTHAL