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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
 
- Since:
 - BlackBerry API 3.6.0
 
 
 
 
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
 }
 
- See Also:
 - Constant Field Values
 - Category:
 
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
 
- Since:
 - BlackBerry API 3.6.0
 
 
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
 }
 
- See Also:
 - Constant Field Values
 - Category:
 
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
 
- Since:
 - BlackBerry API 3.6.0
 
 
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
 }
 
- See Also:
 - Constant Field Values
 - Category:
 
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
 
- Since:
 - BlackBerry API 3.6.0
 
 
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
 }
 
- See Also:
 - Constant Field Values
 - Category:
 
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
 
- Since:
 - BlackBerry API 3.6.0
 
 
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
 }
 
- See Also:
 - Constant Field Values
 - Category:
 
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
 
- Since:
 - BlackBerry API 3.6.0
 
 
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
 }
 
- See Also:
 - Constant Field Values
 - Category:
 
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
 
- Since:
 - BlackBerry API 3.6.0
 
 
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.- Category:
 
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
 
- Since:
 - BlackBerry API 3.6.0
 
 
 
testRandomSource
public static int testRandomSource()
- Tests RandomSource for randomness.
 
- Returns:
 - ALL_TESTS_PASSED if all tests passed.
 - Category:
 
- Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
 
- Since:
 - BlackBerry API 3.6.0
 
 
 
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