using MarketData.MarketDataModel.User;
using MarketData.Security;

namespace MarketData.Extensions
{
  public static class UserExtensions
  {
    public static bool Verify(this User user, string password)
    {
      if(null == user || null == user.Username || null == user.Salt || null==user.Hash)
      {
        return false;
      }
      return Encryption.VerifyPassword(password, user.Salt, user.Hash);
    }    
  }
}
