Show / Hide Table of Contents

Class StorageSharedKeyCredential

A StorageSharedKeyCredential is a credential backed by a Storage Account's name and one of its access keys.

Inheritance
System.Object
StorageSharedKeyCredential
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Storage.Common.dll
Syntax
public class StorageSharedKeyCredential

Constructors

StorageSharedKeyCredential(String, String)

Initializes a new instance of the StorageSharedKeyCredential class.

Declaration
public StorageSharedKeyCredential (string accountName, string accountKey);
Parameters
System.String accountName

The name of the Storage Account.

System.String accountKey

A Storage Account access key.

Properties

AccountName

Gets the name of the Storage Account.

Declaration
public string AccountName { get; }
Property Value
System.String

Methods

ComputeSasSignature(StorageSharedKeyCredential, String)

Generates a base-64 hash signature string for an HTTP request or for a SAS.

Declaration
protected static string ComputeSasSignature (Azure.Storage.StorageSharedKeyCredential credential, string message);
Parameters
StorageSharedKeyCredential credential

The credential.

System.String message

The message to sign.

Returns
System.String

The signed message.

SetAccountKey(String)

Update the Storage Account's access key. This intended to be used when you've regenerated your Storage Account's access keys and want to update long lived clients.

Declaration
public void SetAccountKey (string accountKey);
Parameters
System.String accountKey

A Storage Account access key.

Back to top Azure SDK for .NET