Convert binary data to a decimal string

Source: Internet
Author: User
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);

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.