Examples of base64_decode and base64_encode Encryption and Decryption Functions in php
- 2021-08-05 09:20:48
- OfStack
In this paper, the encryption and decryption functions of base64_decode and base64_encode in php are described by examples. Share it for your reference. The specific analysis is as follows:
These two functions are used in php to encrypt and decipher php code. base64_encode is encrypted, while base64_decode is decrypted. Let's look at two simple examples.
base64_encode Syntax: string base64_decode (string data);
$str='d3d3LmpiNTEubmV0IOiEmuacrOS5i+Wutg=='; // Definition string
echo base64_decode($str); // Output the decoded content
base64_encode Syntax: string base64_encode (string data);
$str='www.ofstack.com Script House '; // Definition string
echo base64_encode($str); // The output encoded content is: d3d3LmpiNTEubmV0IOiEmuacrOS5i+Wutg==
PS: About encryption technology, this site also provides the following encryption tools for your reference:
BASE64 encoding and decoding tool: http://tools.ofstack.com/transcoding/base64
MD5 Online Encryption Tool: http://tools.ofstack.com/password/CreateMD5Password
Escape Encryption/Decryption Tool: http://tools.ofstack.com/password/escapepwd
Online SHA1 Encryption Tool: http://tools.ofstack.com/password/sha1encode
Short chain (short website) online generation tool: http://tools.ofstack.com/password/dwzcreate
Short chain (short website) online restoration tool: http://tools.ofstack.com/password/unshorturl
High Strength Cryptographic Generator: http://tools.ofstack.com/password/CreateStrongPassword
I hope this article is helpful to everyone's PHP programming.