Class HmacAlgorithm
The HmacAlgorithm class generates a signature certifying the integrity of a message.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Social.Common.Rest
Assembly: EPiServer.Social.Common.Rest.dll
Version: 1.5.4Syntax
public class HmacAlgorithm : IHmacAlgorithm
Constructors
HmacAlgorithm(String, String)
Constructor
Declaration
public HmacAlgorithm(string applicationId, string applicationSecret)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | applicationId | Identifier of the application that this algorithm is configured to support |
| System.String | applicationSecret | Cryptographic key that this algorithm will use to compute request signatures |
Properties
ApplicationId
Gets the identifier of the application that this algorithm is configured to support.
Declaration
public string ApplicationId { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ApplicationSecret
Gets the cryptographic key that this algorithm will use to compute request signatures.
Declaration
public string ApplicationSecret { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
ComputeSignature(HmacMessage)
Computes a signature certifying the integrity of the provided message.
Declaration
public string ComputeSignature(HmacMessage message)
Parameters
| Type | Name | Description |
|---|---|---|
| HmacMessage | message | Message to be signed |
Returns
| Type | Description |
|---|---|
| System.String | Signature of the provided message |
GenerateNonce()
Generates a nonce value in a format suitable for computing a message signature.
Declaration
public string GenerateNonce()
Returns
| Type | Description |
|---|---|
| System.String | Nonce value |
GenerateTimestamp()
Generates a timestamp, denoting the current time, in a format suitable for computing a message signature.
Declaration
public ulong GenerateTimestamp()
Returns
| Type | Description |
|---|---|
| System.UInt64 | Timestamp denoting the current time |