public class LunaKeyDerivationHash extends KeyAgreementSpi
| Modifier and Type | Field and Description |
|---|---|
protected LunaKey |
baseKey |
protected long |
mechType |
protected SecretKeyFactory |
skf |
| Modifier | Constructor and Description |
|---|---|
protected |
LunaKeyDerivationHash(long mechType) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkPublicKey(Key key,
boolean lastPhase) |
protected Key |
engineDoPhase(Key key,
boolean lastPhase) |
protected byte[] |
engineGenerateSecret() |
protected int |
engineGenerateSecret(byte[] sharedSecret,
int offset) |
protected SecretKey |
engineGenerateSecret(String algorithm) |
protected void |
engineInit(Key key,
AlgorithmParameterSpec params,
SecureRandom random) |
protected void |
engineInit(Key key,
SecureRandom random) |
protected int |
getDerivedKeyLength(long algId) |
protected int |
getMaxSharedSecretLength() |
protected long mechType
protected LunaKey baseKey
protected final SecretKeyFactory skf
protected void engineInit(Key key, SecureRandom random) throws InvalidKeyException
engineInit in class KeyAgreementSpiInvalidKeyExceptionprotected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException
engineDoPhase in class KeyAgreementSpiInvalidKeyExceptionIllegalStateExceptionprotected SecretKey engineGenerateSecret(String algorithm) throws IllegalStateException, NoSuchAlgorithmException, InvalidKeyException
engineGenerateSecret in class KeyAgreementSpiIllegalStateExceptionNoSuchAlgorithmExceptionInvalidKeyExceptionprotected int getMaxSharedSecretLength()
protected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
engineInit in class KeyAgreementSpiInvalidKeyExceptionInvalidAlgorithmParameterExceptionprotected void checkPublicKey(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException
protected byte[] engineGenerateSecret()
throws IllegalStateException
engineGenerateSecret in class KeyAgreementSpiIllegalStateExceptionprotected int engineGenerateSecret(byte[] sharedSecret,
int offset)
throws IllegalStateException,
ShortBufferException
engineGenerateSecret in class KeyAgreementSpiIllegalStateExceptionShortBufferExceptionprotected int getDerivedKeyLength(long algId)
throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionCopyright 2014-2016 SafeNet Inc