Google Cloud Storage v1 API - Interface UrlSigner.IBlobSigner (4.4.0)

public interface UrlSigner.IBlobSigner

Reference documentation and code samples for the Google Cloud Storage v1 API interface UrlSigner.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

GoogleGoogle.CloudGoogle.Cloud.StorageV1

Assembly

Google.Cloud.Storage.V1.dll

Properties

Algorithm

string Algorithm { get; }

The signing algorithm used by this blob signer.

Property Value
TypeDescription
string

Id

string Id { get; }

The identity of the signer, typically an email address.

Property Value
TypeDescription
string

Methods

CreateSignature(byte[], BlobSignerParameters)

string CreateSignature(byte[] data, UrlSigner.BlobSignerParameters parameters)

Synchronously signs the given blob.

Parameters
NameDescription
databyte

The data to sign. Must not be null.

parametersUrlSignerBlobSignerParameters

Parameters to use when deriving the signing key. Concrete implementations may allow a null value if no parameters are required.

Returns
TypeDescription
string

The blob signature as base64 text.

CreateSignatureAsync(byte[], BlobSignerParameters, CancellationToken)

Task<string> CreateSignatureAsync(byte[] data, UrlSigner.BlobSignerParameters parameters, CancellationToken cancellationToken)

Asynchronously signs the given blob.

Parameters
NameDescription
databyte

The data to sign. Must not be null.

parametersUrlSignerBlobSignerParameters

Parameters to use when deriving the signing key. Concrete implementations may allow a null value if no parameters are required.

cancellationTokenCancellationToken

The token to monitor for cancellation requests.

Returns
TypeDescription
Taskstring

A task representing the asynchronous operation, with a result returning the blob signature as base64 text.