public enum SignatureMethod
{
HMAC_SHA1,
RSA_SHA1,
PLAINTEXT
}
public static class ExtensionMethods
{
public static string MapToString(this SignatureMethod signatureMethod)
{
switch (signatureMethod)
{
case SignatureMethod.HMAC_SHA1:
return "HMAC-SHA1";
case SignatureMethod.RSA_SHA1:
return "RSA-SHA1";
case SignatureMethod.PLAINTEXT:
return "PLAINTEXT";
default:
throw new ArgumentException(nameof(signatureMethod));
}
}
}
stringwithUriwhere possible and sensible