|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.crypto.AbstractPseudoRandomSource
net.rim.device.api.crypto.AESCTRDRBGPseudoRandomSource
public final class AESCTRDRBGPseudoRandomSource
An implementation of a Deterministic Random Bit Generator (DRBG) using an approved AES block cipher algorithm in counter mode. This DRBG uses a 128 bit security strength.
Constructor Summary | ||
---|---|---|
|
AESCTRDRBGPseudoRandomSource(byte[] seed)
Creates an AESCTRDRBGPseudoRandomSource object using the specified seed key. |
|
|
AESCTRDRBGPseudoRandomSource(byte[] seed,
byte[] additionalSeed)
Creates an AESCTRDRBGPseudoRandomSource object using the specified seed key and the additional seed. |
|
|
AESCTRDRBGPseudoRandomSource(byte[] seed,
int offset,
int length)
Creates an AESCTRDRBGPseudoRandomSource object using the specified seed key. |
|
|
AESCTRDRBGPseudoRandomSource(byte[] seed,
int offset,
int length,
byte[] additionalSeed,
int additionalSeedOffset,
int additionalSeedLength)
Creates an AESCTRDRBGPseudoRandomSource object using the specified seed key and the additional seed. |
Method Summary | ||
---|---|---|
|
String |
getAlgorithm()
Returns the name of this algorithm, "AES CTR DRBG". |
|
int |
getAvailable()
Returns the number of pseudo random bytes currently available. |
|
int |
getMaxAvailable()
Returns the maximum number of pseudo random bytes that this DRBG can produce. |
|
void |
xorBytes(byte[] buffer,
int offset,
int length)
Exclusive-OR's (xor) random bytes into the specified buffer starting at the specified array offset. |
Methods inherited from class net.rim.device.api.crypto.AbstractPseudoRandomSource |
---|
getBytes, getBytes, getBytes, xorBytes, xorBytes, xorCopy, xorCopy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.rim.device.api.crypto.PseudoRandomSource |
---|
getBytes, getBytes, getBytes, xorBytes, xorBytes, xorCopy, xorCopy |
Constructor Detail |
---|
public AESCTRDRBGPseudoRandomSource(byte[] seed)
AESCTRDRBGPseudoRandomSource
object using the specified seed key.
seed
- The seed key to use. Note that the seed length can be up to 1024 bytes.public AESCTRDRBGPseudoRandomSource(byte[] seed, int offset, int length)
AESCTRDRBGPseudoRandomSource
object using the specified seed key.
seed
- The seed key to use.offset
- The starting offset of the seed data.length
- The number of bytes to use as seed data. Note that the seed length can be up to 1024 bytes.public AESCTRDRBGPseudoRandomSource(byte[] seed, byte[] additionalSeed)
AESCTRDRBGPseudoRandomSource
object using the specified seed key and the additional seed.
The two seeds will be combined before seeding the Deterministic Random Bit Generator (DRBG).
seed
- The seed key to use. Note that the seed length can be up to 1024 bytes.additionalSeed
- The additional user provided seed to use. Note that additional seed's length can be up to 1024 bytes.public AESCTRDRBGPseudoRandomSource(byte[] seed, int offset, int length, byte[] additionalSeed, int additionalSeedOffset, int additionalSeedLength)
AESCTRDRBGPseudoRandomSource
object using the specified seed key and the additional seed.
The two seeds will be combined before seeding the Deterministic Random Bit Generator (DRBG).
seed
- The seed key to use.offset
- The starting offset of the seed data.length
- The number of bytes to use as seed data. Note that the seed length can be up to 1024 bytes.additionalSeed
- The additional user seed to use.additionalSeedoffset
- The starting offset of the additional user seed. If additionalSeed
is
null
, this value is ignored.additionalSeedLength
- The number of bytes to use as additional user seed. Note that additional seed's
length can be up to 1024 bytes. If additionalSeed
is null
, this value is ignored.Method Detail |
---|
public String getAlgorithm()
This method will always return the String "AES CTR DRBG".
getAlgorithm
in interface PseudoRandomSource
public void xorBytes(byte[] buffer, int offset, int length)
xorBytes
in interface PseudoRandomSource
xorBytes
in class AbstractPseudoRandomSource
buffer
- The buffer to xor the bytes into.offset
- The starting offset, or initial position of the data, within buffer.length
- The number of bytes to xor.public int getAvailable()
For DRBG sources that have an indefinite length but implement this interface, the value returned is the maximum signed value that will fit into an int.
getAvailable
in interface PseudoRandomSource
public int getMaxAvailable()
For DRBG sources that have an indefinite length but implement this interface, the value returned is the maximum signed value that will fit into an int.
getMaxAvailable
in interface PseudoRandomSource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal