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
ConstructorDescriptionDSSSecureRandomProvider
(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 instancevoid
setBinaryLength
(int binaryLength) Sets the amount of bytes to be computed for FixedSecureRandom 16 bytes is required per one AES Vector initializationvoid
setDigestAlgorithm
(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
-PAdESCommonParameters
to compute seed value from
-
DSSSecureRandomProvider
Constructor to instantiate DSSSecureRandomProvider from image parameters. Concatenates all attributes from SignatureImageParameters to a BAOS.- Parameters:
imageParameters
-SignatureImageParameters
to 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:SecureRandomProvider
Gets SecureRandom instance- Specified by:
getSecureRandom
in interfaceSecureRandomProvider
- Returns:
SecureRandom
-