Base64 coding is a kind of coding method of “guard against gentleman but not villain”. It is widely used in MIME Protocol. As the transmission code of e-mail, the generated code is reversible. The last two bits may have “=”, and the generated codes are all ASCII characters.
Advantages: fast speed, ASCII characters, incomprehensible to the naked eye
disadvantages: the encoding is relatively long, very easy to crack, only suitable for the occasion of encrypting non key information
Base64 encoding and decoding in Python
& gt; & gt; & gt; import Base64
& gt; & gt; s =’I am a string ‘
& gt; & gt; a = Base64. B64encode (s)
& gt; & gt; & gt; Print a
ztlkx9fwt / u0rg = =
& gt; & gt; & gt; print Base64. B64decode (a)
I am a string
Read More:
- ERR_CONTENT_DECODING_FAILED error occurs in PHP program, summary of solutions
- Python:ImportError: No module named indexes.base
- Error in ffmpeg decoding real-time stream “non existing PPS 0 referenced, decode”_ slice_ header error,no frame!”
- Bindtextureimage: cleaning GL error: 0x502 during Android opengles2.0 hard decoding
- About the error of base64decoder reference in eclipse
- After SAP Spartacus successfully logs in, does the request base site need access token
- Error message from server: ERROR: invalid page header in block of relation base
- Solve the problem of unable to locate package python3.6 when upgrading from python3.5 to python3.6 in ubantu16.04
- Python – [encoding] in Python os.system Solution to Chinese garbled code when calling CMD command
- Sklearn.datasets.base import error [How to Solve]
- Pin callback Base64 decryption error
- Can’t find Python executable “D:\python3\python.exe”, you can set the PYTHON env variable.
- Terminal appears after anconda is installed on MAC (base)
- TypeError: int() can’t convert non-string with explicit base
- ImportError: No module named indexes.base
- The python version output from the command line is inconsistent with the python version in the current CONDA environment
- After canceling the startup of Ubuntu terminal, it will automatically enter the base environment of CONDA
- CentOS 8.2 installation-solve Error setting up base repository
- CentOS 7 installation error: Cannot find a valid baseurl for repo: base/7/x86_6
- Solve the problem of Python in Windows environment: Fatal error in launcher: Unable to create process using’”‘ in pip installation