What is base64 encoding used for?

后端 未结 18 746
滥情空心
滥情空心 2020-11-22 09:45

I\'ve heard people talking about \"base 64 encoding\" here and there. What is it used for?

18条回答
  •  心在旅途
    2020-11-22 09:58

    Base64 can be used for many purposes.

    The primary reason is to convert binary data to something passable.

    I sometimes use it to pass JSON data around from one site to another, store information in cookies about a user.

    Note: You "can" use it for encryption - I don't see why people say you can't, and that it's not encryption, although it would be easily breakable and is frowned upon. Encryption means nothing more than converting one string of data to another string of data that can be either later decrypted or not, and that's what base64 does.

提交回复
热议问题