Function example
Base64 is a group of encoding schemes used to encode the checksum. The example is as follows:
function test_base64_decode() returns (bool , string memory)
{
string memory name = "aHR0cDovL3Rlc3RfYmFzZTY0IH4hQCMkJQ==";
return base64_decode(name);
}
function test_base64_encode() returns (bool , string memory)
{
string memory name = "http://test_base64 ~! @#$%";
return base64_encode(name);
}
base64_decode
The base64_decode() function is an inbuilt function in PHP used to decode data which is encoded in MIME base64.
Function
base64_decode(string data) returns(bool result, string memory data);
Request parameters
Name | Required | Type | Description |
data | Yes | string | The data to be decoded. |
Response parameters
Parameter | Required | Type | Description |
result | Yes | bool | The return value of the method. A value of true indicates that the method is called. A value of false indicates that the call has failed. |
data | Yes | string | The encoded data that is returned. |
base64_encode
The base64_encode() function is an inbuilt function in PHP used to encode data with MIME base64.
Function
base64_encode(string data) returns(bool result, string memory data) ;
Request parameters
Name | Required | Type | Description |
data | Yes | string | The data to be encoded. |
Response parameters
Parameter | Required | Type | Description |
result | Yes | bool | The return value of the method. A value of true indicates that the method is called. A value of false indicates that the call has failed. |
data | Yes | string | The encoded data that is returned. |