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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -