Two-way EncryptionBy using this concept, we can encode and decode the data. In simple terms, two-way encryption means there is both encrypt and decrypt function present. In PHP, two-way encryption is accomplished through the following function. 1. base64_encode()This function is used to encode the given data with base64. This function was introduced in PHP 4.0. SyntaxParameters
Returns:The base64_encode() function returns the encoded data as string. Example 1Output: ![]() Example 2Output: ![]() 2. base64_decode():The base64_decode() function is used to decode a base64 encoded data. This function was introduced in PHP 4.0. SyntaxParameters
Returns:The base64_decode() function returns the decoded data or false on failure. The returned data may be binary. Example 1Output: ![]() Example 2Output: ![]() Next TopicPHP Tutorial
|