Class DHValidationParameters
- java.lang.Object
-
- org.bouncycastle.crypto.asymmetric.DHValidationParameters
-
public class DHValidationParameters extends java.lang.ObjectValidation parameters for confirming Diffie-Hellman parameter generation.
-
-
Constructor Summary
Constructors Constructor Description DHValidationParameters(byte[] seed)Base constructor - a seed, the counter will be set to -1.DHValidationParameters(byte[] seed, int counter)Constructor with a seed and a (p, q) counter for it.DHValidationParameters(byte[] seed, int counter, int usageIndex)Base constructor with a seed, counter, and usage index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)intgetCounter()Return the (p, q) counter value.byte[]getSeed()Return the seed used for the parameter generation.intgetUsageIndex()Return the usage index, -1 if none given.inthashCode()
-
-
-
Constructor Detail
-
DHValidationParameters
public DHValidationParameters(byte[] seed)
Base constructor - a seed, the counter will be set to -1.- Parameters:
seed- the seed used to generate the parameters.
-
DHValidationParameters
public DHValidationParameters(byte[] seed, int counter)Constructor with a seed and a (p, q) counter for it.- Parameters:
seed- the seed used to generate the parameters.counter- the counter value associated with using the seed to generate the parameters.
-
DHValidationParameters
public DHValidationParameters(byte[] seed, int counter, int usageIndex)Base constructor with a seed, counter, and usage index.- Parameters:
seed- the seed value.counter- (p, q) counter - -1 if not avaliable.usageIndex- the usage index.
-
-
Method Detail
-
getCounter
public int getCounter()
Return the (p, q) counter value.- Returns:
- the (p, q) counter value, -1 if unavailable.
-
getSeed
public byte[] getSeed()
Return the seed used for the parameter generation.- Returns:
- the seed array.
-
getUsageIndex
public int getUsageIndex()
Return the usage index, -1 if none given.- Returns:
- the usage index.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-