Class DSSSecureRandomProvider
java.lang.Object
eu.europa.esig.dss.pdf.encryption.DSSSecureRandomProvider
- All Implemented Interfaces:
SecureRandomProvider
public class DSSSecureRandomProvider extends Object implements SecureRandomProvider
Default
SecureRandomProvider
used in DSS,
returning org.bouncycastle.crypto.prng.FixedSecureRandom instance-
Constructor Summary
Constructors Constructor Description DSSSecureRandomProvider(PAdESCommonParameters parameters)
The default constructor taking an object to compute seeds from Concatenates all attributes from PAdESCommonParameters to a BAOS -
Method Summary
Modifier and Type Method Description SecureRandom
getSecureRandom()
Gets 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
-
-
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
-