Exemple #1
0
        }         // constructor

        /// <summary>
        /// Creates an instance from serialized data (e.g. loaded from DB).
        /// </summary>
        /// <param name="userName">User name.</param>
        /// <param name="cycleCount">Encrypted cycle count.</param>
        /// <param name="password">Hashed password.</param>
        /// <param name="salt">Encoded salt.</param>
        public HashedPassword(string userName, string cycleCount, string password, string salt)
        {
            Raw = new RawValues(this);

            UserName      = userName;
            this.password = Base64(password);
            this.salt     = Base64(salt);

            try {
                this.cycleCount = int.Parse(Encrypted.Decrypt(cycleCount));
            } catch {
                this.cycleCount = 0;
            }     // try
        }         // constructor
Exemple #2
0
 public static string Decrypt(Encrypted input)
 {
     return(input.Decrypt());
 }         // Decrypt