Exemple #1
0
 private bool VerifyUrlIfEncryptionMode(string url, string token)
 {
     if (!string.IsNullOrEmpty(_configuration["EnableCryptoMode"]))
     {
         string[] passwordKeys = _configuration["PasswordKeys"].Split(',');
         foreach (var key in passwordKeys)
         {
             if (SecurityUtility.GetHMAC_SHA256(url, key) == token)
             {
                 return(true);
             }
         }
         return(false);
     }
     return(true);
 }