I want to convert binary data to a decimal string for help. I have a string of Base64 after the data is unencrypted, which is binary data. how can I convert this string to decimal and then output it as a string? I tried to convert the bindec () function, but the result is 0. it is hard to understand. other hexadecimal conversion functions have also tried, but the binary data can be converted to a decimal string for help.
I have a string of Base64 encoded binary data. how can I convert the string binary data to decimal and then output it as a string? I tried to convert the bindec () function, but the result is 0. it's hard to understand. other hexadecimal conversion functions have also been tried, but none seem to work.
Here is my Base64 original data
Authorization/authorization + PTAViKCYyUfrj1lmuE6pe5mI5ol/FwwZGn6Z1OTYlDo8BZLrYHhl2FKyW8 =
------ Solution --------------------
PHP code
$data = base64_decode('V3FwMbiBTiYKVBXgO68BwSRWUXQETmISFVKmKWb2P7bgn/b49neYqikxbO8l9ZsnZ2hqHauZXEHMDmj5wKCXd59bSLmidYwdAojwUMNt4Uh3DkRa+PTAViKCYyUfrj1lmuE6pe5mI5ol/FwwZGn6Z1OTYlDo8BZLrYHhl2FKyW8='); $t0 = current(unpack('H*',$data));$t1 = "57717031b8814e260a5415e03baf01c124565174044e62121552a62966f63fb6e09ff6f8f67798aa29316cef25f59b2767686a1dab995c41cc0e68f9c0a097779f5b48b9a2758c1d0288f050c36de148770e445af8f4c056228263251fae3d659ae13aa5ee66239a25fc5c306469fa6753936250e8f0164bad81e197614ac96f";var_dump($t0 == $t1);