public static enum CryptoRandomFactory.RandomProvider extends Enum<CryptoRandomFactory.RandomProvider>
Usage:
props.setProperty(CryptoRandomFactory.CLASSES_KEY, RandomProvider.OPENSSL.getClassName()); props.setProperty(...); // if required by the implementation random = CryptoRandomFactory.getCryptoRandom(transformation, props);
??????? |
---|
JAVA
The SecureRandom implementation from the JVM
Uses the property with key
CryptoRandomFactory.JAVA_ALGORITHM_KEY
with the default of
CryptoRandomFactory.JAVA_ALGORITHM_DEFAULT |
OPENSSL
The OpenSSL Random implementation (using JNI)
No properties are used for configuration, but they
are passed to the
JAVA backup implementation |
OS
The OS random device implementation.
|
?????? | ????? |
---|---|
String |
getClassName()
Gets the class name of the provider.
|
Class<? extends CryptoRandom> |
getImplClass()
Gets the implementation class of the provider.
|
static CryptoRandomFactory.RandomProvider |
valueOf(String name)
??????????????????
|
static CryptoRandomFactory.RandomProvider[] |
values()
???????????????, ??
??????????
|
public static final CryptoRandomFactory.RandomProvider OPENSSL
No properties are used for configuration, but they
are passed to the JAVA
backup implementation
public static final CryptoRandomFactory.RandomProvider JAVA
Uses the property with key
CryptoRandomFactory.JAVA_ALGORITHM_KEY
with the default of
CryptoRandomFactory.JAVA_ALGORITHM_DEFAULT
public static final CryptoRandomFactory.RandomProvider OS
Uses CryptoRandomFactory.DEVICE_FILE_PATH_KEY
to determine the
path to the random device, default is
CryptoRandomFactory.DEVICE_FILE_PATH_DEFAULT
public static CryptoRandomFactory.RandomProvider[] values()
for (CryptoRandomFactory.RandomProvider c : CryptoRandomFactory.RandomProvider.values()) System.out.println(c);
public static CryptoRandomFactory.RandomProvider valueOf(String name)
name
- ????????????IllegalArgumentException
- ??????????????????NullPointerException
- ???????public String getClassName()
public Class<? extends CryptoRandom> getImplClass()
Copyright © 2016 The Apache Software Foundation. All rights reserved.