Today, let's look at the use of base64 cryptographic functions, and the difference between Python2 and Python3.
First, base64
Base64 is a representation of binary data based on 64 printable characters. Since 2 of the 6 is equal to 64, every 6 bits
Java and JavaScript Base64 encoding
When developing Java Web applications, it is possible to use Java for BASE64 encoding on the server side, while the client can decode it with JavaScript. This requires consistency of Base64 coding mechanisms on
Tian haili @ csdn
2012-07-31
The mime (multipurposeinternet Mail Extensions) is used when an email is uploaded or transmitted over the network ). Mail transmission can only deliver US-ASCII characters, and other characters in the mail must be
Unicode introduction under pylons: http://wiki.pylonshq.com/display/pylonsdocs/Unicode 1.3 Unicode literals in Python source code
In Python source code, Unicode literals are written as strings prefixedThe 'U' or 'U' character:
12
>
During network programming, you often need to print the received data in hexadecimal format for easy viewing. Today we found that there is such a simple method in Python.
>>> "Hello". encode ("hex ")'68656c6c6f'
You can also
>>> '68656c6c6f'.
: This article describes how to write unicode characters in mysq and php. For more information about PHP tutorials, see.
Some special characters (icon characters) cannot be inserted into the database when saving mysql. you can convert the characters
>>> "Hello". Encode ("hex")
' 68656c6c6f '
The corresponding can also
>>> ' 68656c6c6f '. Decode ("hex")' Hello '
Check the manuals, and these codec are available.
Codec
Aliases
Operand type
Purpose
Base64_codec
The example of this paper describes the Base64 encryption, MD5 encryption and SHA1 encryption implemented by JS. Share to everyone for your reference, specific as follows:
1, Base64 encryption
The Base64.js file is introduced into the page, and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.