Class LatitudePayHMACSHA256SignatureGenerator
Generates signatures for LatitudePay requests using HMACSHA256.
Inherited Members
Namespace: Yort.LatitudePay.InStore
Assembly: Yort.LatitudePay.InStore.dll
Syntax
public sealed class LatitudePayHMACSHA256SignatureGenerator : ILatitudePaySignatureGenerator, IDisposable
Constructors
| Improve this Doc View SourceLatitudePayHMACSHA256SignatureGenerator(String)
Initializes a new instance of the LatitudePayHMACSHA256SignatureGenerator class.
Declaration
public LatitudePayHMACSHA256SignatureGenerator(string apiSecret)
Parameters
Type | Name | Description |
---|---|---|
String | apiSecret | The LatitudePay API secret. |
Methods
| Improve this Doc View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
GenerateSignature(String)
Generates the signature for a string containing a LatitudePay request body in json format.
Declaration
public string GenerateSignature(string jsonPayload)
Parameters
Type | Name | Description |
---|---|---|
String | jsonPayload | The json payload. |
Returns
Type | Description |
---|---|
String | A string containing the required signature. |
Remarks
If jsonPayload
is null or an empty string then null is returned as the signature.
Exceptions
Type | Condition |
---|---|
ObjectDisposedException | Thrown if Dispose() has been called on this instance. |