Range of valid character for a base64 encoding

前端 未结 4 1042
既然无缘
既然无缘 2020-12-03 00:30

I am interested in the following:
Is there a list of characters that would never occur as part of a base 64 encoded string?
For example *

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-03 01:20

    https://en.wikipedia.org/wiki/Base64#Design

    MIME's Base64 implementation uses A–Z, a–z, and 0–9 for the first 62 values

    So for the most part you should expect only alphanumeric characters. The example table in this article shows '+' and '-' also; it's unlikely you would see '*'.

    You can use http://www.motobit.com/util/base64-decoder-encoder.asp to convert to Base64 for example, and for '*' this returns "Kg=="

提交回复
热议问题