/// <summary>
        /// Creates a user credential from the provided data.
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <param name="strength"></param>
        /// <param name="saltSize"></param>
        /// <param name="iterations"></param>
        /// <returns></returns>
        public SrpUserCredential(string username, string password, SrpStrength strength = SrpStrength.Bits1024, int saltSize = 32, int iterations = 4000)
        {
            username      = username.Normalize(NormalizationForm.FormKC);
            password      = password.Normalize(NormalizationForm.FormKC);
            UsernameBytes = Encoding.UTF8.GetBytes(username);

            var        constants = SrpConstants.Lookup(strength);
            BigInteger N         = constants.N;
            BigInteger g         = constants.g;

            byte[] s            = SaltGenerator.Create(saltSize);
            byte[] hashPassword = PBKDF2.ComputeSaltedPassword(HMACMethod.SHA512, Encoding.UTF8.GetBytes(password), s, iterations, 64);

            Sha512Digest hash = new Sha512Digest();

            byte[] output = new byte[hash.GetDigestSize()];
            hash.BlockUpdate(UsernameBytes, 0, UsernameBytes.Length);
            hash.Update((byte)':');
            hash.BlockUpdate(hashPassword, 0, hashPassword.Length);
            hash.DoFinal(output, 0);
            hash.BlockUpdate(s, 0, s.Length);
            hash.BlockUpdate(output, 0, output.Length);
            hash.DoFinal(output, 0);
            BigInteger x = new BigInteger(1, output).Mod(N);
            BigInteger v = g.ModPow(x, N);

            UserName            = username;
            Salt                = s;
            Verification        = v.ToByteArray();
            Iterations          = iterations;
            SrpStrength         = strength;
            VerificationInteger = new BigInteger(1, Verification);
        }