SHOW Signed

net.rim.device.api.crypto
Class PRNGTest

java.lang.Object
  |
  +--net.rim.device.api.crypto.PRNGTest

public final class PRNGTest
extends Object

Performs tests to ensure that the pseudo random number generator (PRNG) is functioning correctly.

Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

Since:
JDE 3.6.0

Field Summary
 Category: Signed static int ALL_FIPS_TESTS_PASSED
          A mask representing all of the FIPS tests.
 Category: Signed static int ALL_TESTS_PASSED
          A mask representing all of the tests.
 Category: Signed static int LONG_RUNS_TEST_PASSED
          A mask representing the long runs test.
 Category: Signed static int MONO_BIT_TEST_PASSED
          A mask representing the mono bit test.
 Category: Signed static int POKER_TEST_PASSED
          A mask representing the poker test.
 Category: Signed static int RUNS_TEST_PASSED
          A mask representing the runs test.
 
Method Summary
 Category: Signed static int testPRNG(PseudoRandomSource source)
          Tests the pseudo-random source given the PseudoRandomSource object.
 Category: Signed static int testRandomSource()
          Tests RandomSource for randomness.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MONO_BIT_TEST_PASSED

public static final int MONO_BIT_TEST_PASSED
A mask representing the mono bit test. This value can be used as a mask with the results of the PRNG tests to determine if the mono bit test passed. For example: if ( ( result & MONO_BIT_TEST_PASSED ) == 0 ) { // mono bit test failed }
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

POKER_TEST_PASSED

public static final int POKER_TEST_PASSED
A mask representing the poker test. This value can be used as a mask with the results of the PRNG tests to determine if the poker test passed. For example: if ( ( result & POKER_TEST_PASSED ) == 0 ) { // poker test failed }
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

RUNS_TEST_PASSED

public static final int RUNS_TEST_PASSED
A mask representing the runs test. This value can be used as a mask with the results of the PRNG tests to determine if the runs test passed. For example: if ( ( result & RUNS_TEST_PASSED ) == 0 ) { // runs test failed }
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

LONG_RUNS_TEST_PASSED

public static final int LONG_RUNS_TEST_PASSED
A mask representing the long runs test. This value can be used as a mask with the results of the PRNG tests to determine if the long runs test passed. For example: if ( ( result & LONG_RUNS_TEST_PASSED ) == 0 ) { // long runs test failed }
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

ALL_TESTS_PASSED

public static final int ALL_TESTS_PASSED
A mask representing all of the tests. This value can be used as a mask with the results of the PRNG tests to determine if all of the tests passed. For example: if ( ( result & ALL_TESTS_PASSED ) == ALL_TESTS_PASSED ) { // one or more of the tests failed }
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

ALL_FIPS_TESTS_PASSED

public static final int ALL_FIPS_TESTS_PASSED
A mask representing all of the FIPS tests. This value can be used as a mask with the results of the PRNG tests to determine if all of the FIPS tests passed. For example: if ( ( result & ALL_FIPS_TESTS_PASSED ) == ALL_FIPS_TESTS_PASSED ) { // one or more of the tests failed }
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Method Detail

testPRNG

public static int testPRNG(PseudoRandomSource source)
                    throws CryptoTokenException
Tests the pseudo-random source given the PseudoRandomSource object.

Parameters:
source - The pseudo-random source of the.
Returns:
A boolean that determines if the source is suitably random.
Throws:
CryptoTokenException - Thrown if an error occurs with the crypto token or the crypto token is invalid.
Since:
JDE 4.0.2
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

testRandomSource

public static int testRandomSource()
Tests RandomSource for randomness.

Returns:
ALL_TESTS_PASSED if all tests passed.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.


Copyright 1999-2004 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.