Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.bouncycastle.crypto.agreement.srp;
Generates new SRP verifier for user
    protected BigInteger N;
    protected BigInteger g;
    protected Digest digest;
    public SRP6VerifierGenerator()

Initialises generator to create new verifiers

N The safe prime to use (see DHParametersGenerator)
g The group parameter to use (see DHParametersGenerator)
digest The digest to use. The same digest type will need to be used later for the actual authentication attempt. Also note that the final session key size is dependent on the chosen digest.
    public void init(BigInteger NBigInteger gDigest digest)
        this. = N;
        this. = g;
        this. = digest;
    public void init(SRP6GroupParameters groupDigest digest)
        this. = group.getN();
        this. = group.getG();
        this. = digest;

Creates a new SRP verifier

salt The salt to use, generally should be large and random
identity The user's identifying information (eg. username)
password The user's password
A new verifier for use in future SRP authentication
    public BigInteger generateVerifier(byte[] saltbyte[] identitybyte[] password)
        BigInteger x = SRP6Util.calculateX(saltidentitypassword);
        return .modPow(x);
New to GrepCode? Check out our FAQ X