public class LunaRandom
extends java.security.SecureRandomSpi
The user must be logged in to an HSM. The RNG operations will occur on the default slot as returned by
LunaSlotManager.getDefaultSlot().
| Constructor and Description |
|---|
LunaRandom() |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
engineGenerateSeed(int numBytes)
Returns the given number of seed bytes.
|
protected void |
engineNextBytes(byte[] buffer)
Retrieve a user-specified number of random bytes from the Luna HSM's random number generator.
|
protected void |
engineSetSeed(byte[] seed)
Re-seed the hardware RNG with the given seed.
|
protected void engineSetSeed(byte[] seed)
engineSetSeed in class java.security.SecureRandomSpiseed - The seedLunaException - if there are no tokens present on the systemprotected void engineNextBytes(byte[] buffer)
engineNextBytes in class java.security.SecureRandomSpibuffer - The buffer to fill with random dataLunaException - if there are no tokens present on the systemprotected byte[] engineGenerateSeed(int numBytes)
engineGenerateSeed in class java.security.SecureRandomSpinumBytes - The number of seed bytes to generateCopyright 2014-2018 SafeNet. All rights reserved.