public class NativeSecretKeyFactorySpi extends SecretKeyFactorySpi
| Constructor and Description |
|---|
NativeSecretKeyFactorySpi(int algorithmId,
String algorithm)
SPI constructor.
|
| Modifier and Type | Method and Description |
|---|---|
SecretKey |
engineGenerateSecret(KeySpec keySpec)
Generates a
SecretKey object from the provided key specification (key material). |
static int |
nativeGetAlgorithm(byte[] algorithm)
Get the supported algorithm native ID.
|
static int |
nativeGetCloseId(int algorithmId)
Gets the id of the native close function.
|
public NativeSecretKeyFactorySpi(int algorithmId,
String algorithm)
algorithmId - the matching native Id of the algorithm.algorithm - the standard string name of the algorithm.public SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException
SecretKeyFactorySpiSecretKey object from the provided key specification (key material).engineGenerateSecret in class SecretKeyFactorySpikeySpec - the specification (key material) of the secret keyInvalidKeySpecException - if the given key specification is inappropriate for this secret-key factory to produce a secret
key.public static int nativeGetAlgorithm(byte[] algorithm)
algorithm - Null terminated string that describes the algorithmpublic static int nativeGetCloseId(int algorithmId)
algorithmId - the algorithm IDNativeException - on error