Esempio n. 1
0
 static CryptoService()
 {
     Salt = ConfigurationManagerHelper.GetValueOnKey("stardust.CSalt");
     if (Salt.IsNullOrWhiteSpace())
     {
         Salt = "tinkerBell";
     }
 }
Esempio n. 2
0
        public void SetPassword(string salt, string hash)
        {
            if (!Salt.IsNullOrWhiteSpace() || !Hash.IsNullOrWhiteSpace())
            {
                throw new DomainException("Cannot set salt/hash properties because they are already set");
            }

            Salt = salt;
            Hash = hash;
        }