What will be the max length of base64encode string of length 10 in python? -


what max length can expect base64encoded string of length 10 in python? need specify in database.

every base64 character encodes 6 bits. if original string 80 bits (10 * 8), 80/6 = ~13.3 need 14 characters represent 80 bits, plus 2 padding characters.

base64 string must have multiple of 4, every 4 characters maps 3 bytes. '=' character used padding.

edit: clarity, 14+2 = 16


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -