Class SmsSignatureGenerator
- Namespace
- Vonage.Cryptography
- Assembly
- Vonage.dll
Generates the signature applied to SMS API requests when using signed-request authentication.
The resulting signature is sent as the sig parameter so the Vonage API can verify the request
originated from the holder of the signature secret.
public class SmsSignatureGenerator
- Inheritance
-
SmsSignatureGenerator
- Inherited Members
Remarks
Configure the desired hashing SmsSignatureGenerator.Method on Credentials via FromApiKeySignatureSecretAndMethod(string, string, Method). HMAC variants are preferred over the legacy md5hash mode.
Methods
GenerateSignature(string, string, Method)
Generates a request signature using the supplied hashing method.
public static string GenerateSignature(string query, string securitySecret, SmsSignatureGenerator.Method method)
Parameters
querystringThe request query string to sign (parameters concatenated as
&key=valuepairs).securitySecretstringThe signature secret from your Vonage account dashboard.
methodSmsSignatureGenerator.MethodThe hashing method used to compute the signature.