com.licel.jcardsim.crypto
Class RandomDataImpl
java.lang.Object
javacard.security.RandomData
com.licel.jcardsim.crypto.RandomDataImpl
public class RandomDataImpl
- extends RandomData
Implementation RandomData
based
on BouncyCastle CryptoAPI
- See Also:
RandomData
Method Summary |
void |
generateData(byte[] buffer,
short offset,
short length)
Generates random data. |
void |
setSeed(byte[] buffer,
short offset,
short length)
Seeds the random data generator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomDataImpl
public RandomDataImpl()
generateData
public void generateData(byte[] buffer,
short offset,
short length)
throws CryptoException
- Description copied from class:
RandomData
- Generates random data.
- Specified by:
generateData
in class RandomData
- Parameters:
buffer
- the output bufferoffset
- the offset into the output bufferlength
- the length of random data to generate
- Throws:
CryptoException
- with the following reason codes:
CryptoException.ILLEGAL_VALUE
if the length
parameter is
zero.
setSeed
public void setSeed(byte[] buffer,
short offset,
short length)
- Description copied from class:
RandomData
- Seeds the random data generator.
- Specified by:
setSeed
in class RandomData
- Parameters:
buffer
- the input bufferoffset
- the offset into the input bufferlength
- the length of the seed data