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 SecureRandomgetSecureRandom()Gets 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
-
-
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
-