Class DSSSecureRandomProvider
java.lang.Object
eu.europa.esig.dss.pdf.encryption.DSSSecureRandomProvider
- All Implemented Interfaces:
SecureRandomProvider
Default
SecureRandomProvider used in DSS,
returning org.bouncycastle.crypto.prng.FixedSecureRandom instance-
Constructor Summary
ConstructorsConstructorDescriptionDSSSecureRandomProvider(PAdESCommonParameters parameters) The default constructor taking an object to compute seeds from.DSSSecureRandomProvider(SignatureImageParameters imageParameters) Constructor to instantiate DSSSecureRandomProvider from image parameters. -
Method Summary
Modifier and TypeMethodDescriptionGets SecureRandom instancevoidsetBinaryLength(int binaryLength) Sets the amount of bytes to be computed for FixedSecureRandom 16 bytes is required per one AES Vector initializationvoidsetDigestAlgorithm(DigestAlgorithm digestAlgorithm) Allows to set a DigestAlgorithm that will be applied on serialized parameters
-
Constructor Details
-
DSSSecureRandomProvider
The default constructor taking an object to compute seeds from. Concatenates all attributes from PAdESCommonParameters to a BAOS.- Parameters:
parameters-PAdESCommonParametersto compute seed value from
-
DSSSecureRandomProvider
Constructor to instantiate DSSSecureRandomProvider from image parameters. Concatenates all attributes from SignatureImageParameters to a BAOS.- Parameters:
imageParameters-SignatureImageParametersto compute seed value from
-
-
Method Details
-
setDigestAlgorithm
Allows to set a DigestAlgorithm that will be applied on serialized parameters- Parameters:
digestAlgorithm-DigestAlgorithm
-
setBinaryLength
public void setBinaryLength(int binaryLength) Sets the amount of bytes to be computed for FixedSecureRandom 16 bytes is required per one AES Vector initialization- Parameters:
binaryLength- number of bytes
-
getSecureRandom
Description copied from interface:SecureRandomProviderGets SecureRandom instance- Specified by:
getSecureRandomin interfaceSecureRandomProvider- Returns:
SecureRandom
-