Encrypt and decrypt with PHP base64 function

Source: Internet
Author: User
Tags decrypt
Encrypt and decrypt with PHP base64 function

Lab Environment:
Windows
PHP Environment (Phpstudy One-click Environment Pack)

Put the test php file in this directory

Type the following code

<?php$cany = ‘getshell.top‘; #定义要加密的字符串echo base64_encode($cany);  #输出加密后的字符串?>

has been encrypted by the Base64 function The following is a copy of the encrypted string after the change code is as follows:

<?php$cany = ‘Z2V0c2hlbGwudG9w‘; #放入刚才加密的字符串echo base64_decode($cany);  #输出解密后的字符串?>

It's simple, it's not complicated. Many scenarios are useful for a simple note

Encrypt and decrypt with PHP base64 function

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.