public interface IBlobSigner
Represents the capability of signing a blob in a suitable form for Google Cloud Storage signed URLs. This allows testing URL signing without credentials being available, as well as using Google Cloud IAM to sign blobs.
Namespace
Google.Cloud.Storage.V1Assembly
Google.Cloud.Storage.V1.dll
Properties
Id
string Id { get; }
The identity of the signer, typically an email address.
Property Value | |
---|---|
Type | Description |
System.String |
Methods
CreateSignature(Byte[])
string CreateSignature(byte[] data)
Synchronously signs the given blob.
Parameter | |
---|---|
Name | Description |
data | System.Byte[] The data to sign. Must not be null. |
Returns | |
---|---|
Type | Description |
System.String | The blob signature as base64 text. |
CreateSignatureAsync(Byte[], CancellationToken)
Task<string> CreateSignatureAsync(byte[] data, CancellationToken cancellationToken)
Asynchronously signs the given blob.
Parameters | |
---|---|
Name | Description |
data | System.Byte[] The data to sign. Must not be null. |
cancellationToken | System.Threading.CancellationToken The token to monitor for cancellation requests. |
Returns | |
---|---|
Type | Description |
System.Threading.Tasks.Task<System.String> | A task representing the asynchronous operation, with a result returning the blob signature as base64 text. |