Exemple #1
0
        /// <summary>
        /// Generates a new secure random password.
        /// </summary>
        /// <param name="APassword">Secure random password.</param>
        /// <param name="ASalt">The Salt that was used in the creation of the Password Hash.</param>
        /// <param name="APasswordHash">Password Hash.</param>
        public void GetNewPasswordSaltAndHash(out string APassword, out string ASalt, out string APasswordHash)
        {
            byte[] Salt = GetNewPasswordSalt();

            APassword     = TPasswordHelper.GetRandomSecurePassword();
            APasswordHash = GetPasswordHash(APassword, Salt);
            ASalt         = Convert.ToBase64String(Salt);
        }
 /// <summary>
 /// Generates a new secure random password.
 /// </summary>
 /// <param name="APassword">Secure random password.</param>
 /// <param name="ASalt">The Salt that was used in the creation of the Password Hash.</param>
 /// <param name="APasswordHash">Password Hash.</param>
 public void GetNewPasswordSaltAndHash(out string APassword, out string ASalt, out string APasswordHash)
 {
     APassword     = TPasswordHelper.GetRandomSecurePassword();
     ASalt         = GetNewPasswordSaltString();
     APasswordHash = GetPasswordHash(APassword, ASalt);
 }