Skip to content

Conversation

@CoinWhisperer
Copy link

These changes allow encryption/decryption for any bitcoin-derived coin, using the vbyte arguments of bip38_encrypt() and bip38_decrypt(). The vbyte is usually found in base58.h as PUBKEY_ADDRESS. For example, the PUBKEY_ADDRESS for litecoin is 48. The code is fully backwards compatible because vbyte has been made an optional argument.

Example usage:

>>> vbyte = 48   # litecoin address
>>> encrypted = bip38_encrypt(wif_key, password, vbyte)
>>> decrypted == bip38_decrypt(encrypted, password, vbyte)
>>> assert decrypted == wif_key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant