how Base64 API understands end of String while decoding -
sometimes unable provide entire string .but truncated string base64 api can decode .how base64 understands end of string
how base64 understands end of string
you haven't said which base64 api you're using, typically require string provide multiple of 4 character in length. each 4 characters in base64 string corresponds 3 bytes.
if overall binary data not multiple of 3 bytes, final 4 characters contain padding of =
character indicate desired length. see padding section in wikipedia base64 article more details.
Comments
Post a Comment