我想知道如何使用谷歌云存储类在.NET中生成signurl
我已经创建的字符串按要求
GET
1388534400
/桶/对象名
但我现在要签署这个网址与P12键,然后希望把它的URL友好
该库不显示特定功能,它 - > https://developers.google.com/resources/api-libraries/documentation/storage/v1/csharp/latest/annotated.html
所以,基本上我需要Google_Signer_P12类的PHP的.NET交替
$签名=新Google_Signer_P12(的file_get_contents(__ __ DIR'/'final.p12),notasecret。);
$签名= $ signer->符号($ to_sign);
解决方案
.NET客户端不支持签名的URL(它是一个纯XML API),所以你要么需要进行标注,以类似的工具 gsutil 或生成RSA签名的内部应用程序(Signing并验证与RSA C#签名)
I want to know that how to generate signurl using google cloud storage classes in .net
I have created string as per the requirement
GET
1388534400
/bucket/objectname
but I now want to sign this url with p12 key and then want to make it url friendly
This library doesn't show specific function for it -> https://developers.google.com/resources/api-libraries/documentation/storage/v1/csharp/latest/annotated.html
So, basically I need .net alternate of Google_Signer_P12 class of php
$signer = new Google_Signer_P12(file_get_contents(__DIR__.'/'."final.p12"), "notasecret");
$signature = $signer->sign($to_sign);
解决方案
The .NET client doesn't support signing URLs (it is an XML-only API), so you will need to either make a callout to a tool like gsutil or generate an RSA signature internal to your application (Signing and verifying signatures with RSA C#)