public final class MutableKeyDerivationRegistry extends Object
Key objects from Parameters with fixed randomness.| Modifier and Type | Class and Description |
|---|---|
static interface |
MutableKeyDerivationRegistry.InsecureKeyCreator<ParametersT extends Parameters>
A class to create key objects from parameters with given randomness.
|
| Constructor and Description |
|---|
MutableKeyDerivationRegistry() |
| Modifier and Type | Method and Description |
|---|---|
<ParametersT extends Parameters> |
add(MutableKeyDerivationRegistry.InsecureKeyCreator<ParametersT> creator,
Class<ParametersT> parametersClass)
Adds a new "InsecureKeyCreator" to the instance.
|
Key |
createKeyFromRandomness(Parameters parameters,
InputStream inputStream,
Integer idRequirement,
SecretKeyAccess access)
Creates a
Key from a given Parameters object and additional data. |
static MutableKeyDerivationRegistry |
globalInstance() |
public static MutableKeyDerivationRegistry globalInstance()
public <ParametersT extends Parameters> void add(MutableKeyDerivationRegistry.InsecureKeyCreator<ParametersT> creator, Class<ParametersT> parametersClass) throws GeneralSecurityException
If a creator for this class has been added previously, the two instances have to be equal.
Otherwise, this method throws a GeneralSecurityException.
GeneralSecurityExceptionpublic Key createKeyFromRandomness(Parameters parameters, InputStream inputStream, @Nullable Integer idRequirement, SecretKeyAccess access) throws GeneralSecurityException
Key from a given Parameters object and additional data.
Finds the previously added creator (with add(com.google.crypto.tink.internal.MutableKeyDerivationRegistry.InsecureKeyCreator<ParametersT>, java.lang.Class<ParametersT>)) for the class given by parameters.getClass() and uses it.
GeneralSecurityException