Qiniu developer documentation about the upload credential, the url-safe base64 data is different

Source: Internet
Author: User
The link to the document I browsed is implemented using php. A url-safe base64 calculation method needs to be implemented by myself. The implementation code is as follows: {code ...} the results calculated using the putPolicy value are the same as the above results, but the calculated sign is: YzEwZTI4N2YyYjFlN2Y... links to my browsed documents

I use php for implementation. There is a url-safe base64 calculation method that needs to be implemented by myself. The implementation code is as follows:

function urlsafe_base64_encode( $str ){    return strtr(base64_encode($str), '+/', '-_');}

I useputPolicyThe calculation result of the value is the same as the preceding result,
But computingsignWe can see that:YzEwZTI4N2YyYjFlN2Y1NDdiMjBhOWViY2UyYWFkYTI2YWIyMGVmMg==
AndwQ4ofysef1R7IKnrziqtomqyDvI=Different. I don't know where the problem is?

Reply content:

Links to my browsed documents

I use php for implementation. There is a url-safe base64 calculation method that needs to be implemented by myself. The implementation code is as follows:

function urlsafe_base64_encode( $str ){    return strtr(base64_encode($str), '+/', '-_');}

I useputPolicyThe calculation result of the value is the same as the preceding result,
But computingsignWe can see that:YzEwZTI4N2YyYjFlN2Y1NDdiMjBhOWViY2UyYWFkYTI2YWIyMGVmMg==
AndwQ4ofysef1R7IKnrziqtomqyDvI=Different. I don't know where the problem is?

The examples are not necessarily exactly encoded, but just a demonstration. You can refer to our code implementation: https://github.com/qiniu/php-sdk/blob/develop/qiniu/utils.php

Hello, could you explain how wQ4ofysef1R7IKnrziqtomqyDvI = is calculated? I am using asp. net2.0 without this demo.

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.