Base64_decode and Base64_encode encryption and decryption function instance _php technique in PHP

Source: Internet
Author: User

This article describes the Base64_decode and Base64_encode encryption and decryption functions in PHP. Share to everyone for your reference. The specific analysis is as follows:

These two functions in PHP are used to encrypt the PHP code and password Base64_encode is encrypted, and Base64_decode is decrypted, the following we look at two simple examples.

Base64_encode Syntax: String base64_decode (string data);

Copy Code code as follows:
$str = ' d3d3lmpinteubmv0ioiemuacros5i+wutg== '; Define String
echo Base64_decode ($STR); Output decoded content

Base64_encode Syntax: String base64_encode (string data);
Copy Code code as follows:
$str = ' www.jb51.net cloud-dwelling community '; Define String
echo Base64_encode ($STR); Output encoded after the content is: d3d3lmpinteubmv0ioiemuacros5i+wutg==

PS: About encryption technology, the site also provides the following encryption tools for your reference to use:

BASE64 encoding and decoding tool :http://tools.jb51.net/transcoding/base64

MD5 Online encryption tool:Http://tools.jb51.net/password/CreateMD5Password

Escape Encryption/Decryption tool:http://tools.jb51.net/password/escapepwd

Online SHA1 encryption tool:Http://tools.jb51.net/password/sha1encode

short link (short URL) online generation tool:http://tools.jb51.net/password/dwzcreate

short link (short URL) online restore tool:Http://tools.jb51.net/password/unshorturl

High Strength Password generator:Http://tools.jb51.net/password/CreateStrongPassword

I hope this article will help you with your PHP program design.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.