Check if a string is encoded in base64 using Python

前端 未结 10 2070
离开以前
离开以前 2021-02-05 01:56

Is there a good way to check if a string is encoded in base64 using Python?

10条回答
  •  无人共我
    2021-02-05 02:21

    This isn't possible. The best you could do would be to verify that a string might be valid Base 64, although many strings consisting of only ASCII text can be decoded as if they were Base 64.

提交回复
热议问题