Exemple #1
0
        protected SRPBase(string userName, BigInteger credentials, SRPParameters parameters)
        {
            Contract.Requires(!string.IsNullOrEmpty(userName));
            Contract.Requires(credentials != null);
            Contract.Requires(parameters != null);

            Parameters = parameters;

            if (!parameters.CaseSensitive)
                userName = userName.ToUpper(CultureInfo.InvariantCulture);

            UserName = userName;
            Credentials = credentials;
            SecretValue = parameters.RandomNumber(parameters.KeyLength);
            Validator = new SRPValidator(this);
        }
Exemple #2
0
        protected SRPBase(string userName, BigInteger credentials, SRPParameters parameters)
        {
            Contract.Requires(!string.IsNullOrEmpty(userName));
            Contract.Requires(credentials != null);
            Contract.Requires(parameters != null);

            Parameters = parameters;

            if (!parameters.CaseSensitive)
            {
                userName = userName.ToUpper(CultureInfo.InvariantCulture);
            }

            UserName    = userName;
            Credentials = credentials;
            SecretValue = parameters.RandomNumber(parameters.KeyLength);
            Validator   = new SRPValidator(this);
        }