Is an empty string valid base64 encoded data of zero bytes length?

前端 未结 2 759
夕颜
夕颜 2021-02-18 16:37

One of my colleges was telling me that the empty string is not a valid base64 encoded data string. I don\'t think this is true (he is too lazy to parse it), but after googling a

2条回答
  •  孤城傲影
    2021-02-18 16:51

    According to RFC 4648 Section 10, Test Vectors,

    BASE64("") = ""
    

    I would assume the inverse must hold as well.

提交回复
热议问题