Skip to content

Bech32 encoding in age #352

Answered by Tronic
Tronic asked this question in Q&A
Nov 1, 2021 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Not a perfect solution but something that can be worked with, https://github.com/sipa/bech32/blob/master/ref/python/segwit_addr.py

Need to use the bech32_encode/decode functions together with the convertbits function, and manually remove the 33rd byte (value 0) that it outputs. Also have to work with the secret key always in lower case or otherwise wrong checksum is created (but this is mentioned in Age spec).

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Tronic
Comment options

Comment options

You must be logged in to vote
1 reply
@Tronic
Comment options

Answer selected by Tronic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants