public final class HelixSecretKeyFactory extends SecretKeyFactorySpi
| Constructor and Description |
|---|
HelixSecretKeyFactory()
Creates a new HelixSecretKeyFactory and performs the provider
self-integrity check.
|
| Modifier and Type | Method and Description |
|---|---|
protected SecretKey |
engineGenerateSecret(KeySpec keySpec)
Generates a
SecretKey object from the provided key specification
(key material). |
protected KeySpec |
engineGetKeySpec(SecretKey key,
Class keySpec)
Returns a specification (key material) of the given key object in the
requested format.
|
protected SecretKey |
engineTranslateKey(SecretKey key)
Translates a key object, whose provider may be unknown or potentially
untrusted, into a corresponding key object of this secret-key factory.
|
public HelixSecretKeyFactory()
protected SecretKey engineGenerateSecret(KeySpec keySpec) throws InvalidKeySpecException
SecretKey object from the provided key specification
(key material).engineGenerateSecret in class SecretKeyFactorySpikeySpec - the Helix secret key material (must be a HelixKeySpec
)InvalidKeySpecException - if keySpec is null or not a
HelixKeySpecSecretKeyFactorySpi.engineGenerateSecret(java.security.spec.KeySpec)protected KeySpec engineGetKeySpec(SecretKey key, Class keySpec) throws InvalidKeySpecException
engineGetKeySpec in class SecretKeyFactorySpikey - a Helix secret keykeySpec - specifies the format for the secret key materialInvalidKeySpecException - if key is null or not a Helix secret key in
"RAW" format; or if keySpec is null or not
the class of HelixKeySpec); or if an error occurs
while creating the HelixKeySpec from the secret keySecretKeyFactorySpi.engineGetKeySpec(javax.crypto.SecretKey,
java.lang.Class)protected SecretKey engineTranslateKey(SecretKey key) throws InvalidKeyException
Only the first 32 bytes from key are used in the translation.
engineTranslateKey in class SecretKeyFactorySpikey - a secret key (presumably not a Helix secret key)InvalidKeyException - if key is null; or if key cannot be
used to create a Helix secret keySecretKeyFactorySpi.engineTranslateKey(javax.crypto.SecretKey)Copyright © 2010-2015 Matthew Zipay. All Rights Reserved.