public class PKCS11SeededRandomSpi extends PKCS11RandomSpi
Modifier and Type | Field and Description |
---|---|
protected static int |
INITIAL_SEED_BYTES
The number of initial seed bytes to get from the token to seed this object.
|
protected boolean |
isSeeded_
If this object was already seeded with seed bytes from the token.
|
pkcs11OperationInitialized_, session_, SOFTWARE_SECURE_RANDOM_ALGORITHM, softwareDelegate_, tokenManager_, useSoftwareDelegation_
Constructor and Description |
---|
PKCS11SeededRandomSpi()
This default constructor always links this random class to the first provider instance, because
there are no means in the JCE to find out our provider instance.
|
PKCS11SeededRandomSpi(TokenManager tokenManager)
This constructor links this random class to the given token manager.
|
Modifier and Type | Method and Description |
---|---|
protected void |
engineNextBytes(byte[] arrayToFill)
Generates a user-specified number of random bytes from the software delegate.
|
protected void |
engineSetSeed(byte[] seedBytes)
Reseeds the software delegate of this object.
|
protected int |
getInitialSeedByteNumber()
Get the number of seed bytes to use for initial seeding of this random object.
|
protected void |
initializeSeed()
Initialize the seed of this secure random object.
|
engineGenerateSeed, finalize, finalizePkcs11Operation, getSoftwareDelegateAlgorithm, initialize, initializePkcs11Operation, initializeSession, initializeSoftwareDelegate, isSupportedBy
protected static final int INITIAL_SEED_BYTES
protected boolean isSeeded_
public PKCS11SeededRandomSpi() throws IAIKPkcs11Exception
IAIKPkcs11Exception
- If there is no IAIKPkcs11 instance available.public PKCS11SeededRandomSpi(TokenManager tokenManager) throws IAIKPkcs11Exception
tokenManager
- The manager of the token we use for random generation.IAIKPkcs11Exception
- If there is no IAIKPkcs11 instance available.protected int getInitialSeedByteNumber()
protected void initializeSeed()
protected void engineNextBytes(byte[] arrayToFill) throws IAIKPkcs11Exception
engineNextBytes
in class PKCS11RandomSpi
arrayToFill
- the array to be filled in with random bytes.IAIKPkcs11Exception
- If generating random bytes fails.protected void engineSetSeed(byte[] seedBytes) throws IAIKPkcs11Exception
engineSetSeed
in class PKCS11RandomSpi
seedBytes
- The seed bytes.IAIKPkcs11Exception
- If seeding the random fails.IAIK JavaSecurity Website https://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2023 IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved. Version 1.9.4