Bitcoin Forum

Bitcoin => Electrum => Topic started by: ulhaq on October 13, 2017, 09:17:35 PM



Title: Electrum Encrypted format
Post by: ulhaq on October 13, 2017, 09:17:35 PM
It looks like the encrypted seed is encoded in base64 and always starts with the same few characters and ends in an equal sign, is this right? Will it always be the same number of characters?


Title: Re: Electrum Encrypted format
Post by: pooya87 on October 14, 2017, 04:28:25 AM
it is encoded in Base64 but it doesn't always start with the same few characters and it doesn't nessaasrily end with an "=".
the equal sign (=) is for padding.

from Wikipedia: (https://en.wikipedia.org/wiki/Base64#Output_padding)
"The final '==' sequence indicates that the last group contained only one byte, and '=' indicates that it contained two bytes."

you can see the examples there for more information.

this can also be helpful: https://stackoverflow.com/questions/4080988/why-does-base64-encoding-require-padding-if-the-input-length-is-not-divisible-by