![JAR search and dependency download from the Maven repository](/logo.png)
org.bouncycastle.crypto.internal.params.DsaParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bc-fips-debug Show documentation
Show all versions of bc-fips-debug Show documentation
The FIPS 140-2 Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms certified to FIPS 140-2 level 1. This jar contains the debug version JCE provider and low-level API for the BC-FJA version 1.0.2.3, FIPS Certificate #3514. Please note the debug jar is not certified.
/***************************************************************/
/****** DO NOT EDIT THIS CLASS bc-java SOURCE FILE ******/
/***************************************************************/
package org.bouncycastle.crypto.internal.params;
import java.math.BigInteger;
import org.bouncycastle.crypto.internal.CipherParameters;
public class DsaParameters
implements CipherParameters
{
private BigInteger g;
private BigInteger q;
private BigInteger p;
private DsaValidationParameters validation;
public DsaParameters(
BigInteger p,
BigInteger q,
BigInteger g)
{
this.g = g;
this.p = p;
this.q = q;
}
public DsaParameters(
BigInteger p,
BigInteger q,
BigInteger g,
DsaValidationParameters params)
{
this.g = g;
this.p = p;
this.q = q;
this.validation = params;
}
public BigInteger getP()
{
return p;
}
public BigInteger getQ()
{
return q;
}
public BigInteger getG()
{
return g;
}
public DsaValidationParameters getValidationParameters()
{
return validation;
}
public boolean equals(
Object obj)
{
if (!(obj instanceof DsaParameters))
{
return false;
}
DsaParameters pm = (DsaParameters)obj;
return (pm.getP().equals(p) && pm.getQ().equals(q) && pm.getG().equals(g));
}
public int hashCode()
{
return getP().hashCode() ^ getQ().hashCode() ^ getG().hashCode();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy