Exemple #1
0
 static bool VerifySignature(string signature, bool usePrimaryKey, Func <string> stringToSign)
 {
     if (!SharedKeySignature.HasKey(usePrimaryKey))
     {
         return(false);
     }
     else if (signature == SharedKeySignature.GenerateSignature(stringToSign, usePrimaryKey))
     {
         return(true);
     }
     return(false);
 }
Exemple #2
0
 private static bool VerifyRequestAuthorization(string signature, bool usePrimaryKey, bool liteAlgorithm, string method, string uriPath,
                                                RequestHeaders headers, RequestQueryParameters queryParams, string requestDate, string contentLength)
 {
     if (!SharedKeySignature.HasKey(usePrimaryKey))
     {
         return(false);
     }
     else if (signature == GenerateSignature(usePrimaryKey, liteAlgorithm, method, uriPath, headers, queryParams, requestDate, contentLength))
     {
         return(true);
     }
     return(false);
 }