Exemplo n.º 1
0
        public virtual bool ValidateRequest(string publicKey, string hash, List <string> stockCodes)
        {
            var privateKey = GetPrivateKey(publicKey);

            if (privateKey != null)
            {
                string computedHash = _hashHelper.ComputeHash(SerializeStockCodes(stockCodes), privateKey);
                return(hash == computedHash);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
 public string HashPassword(string password, string salt)
 {
     return(_hashHelper.ComputeHash(password + salt + password));
 }