public class LunaKeyDerivationPRFKDF
extends javax.crypto.KeyAgreementSpi
| Modifier and Type | Field and Description |
|---|---|
protected LunaKey |
baseKey |
protected byte[] |
context |
protected long |
counter |
protected long |
encodingScheme |
protected byte[] |
label |
protected java.security.AlgorithmParameters |
mAlgParams |
protected long |
mechType |
protected long |
prfType |
protected javax.crypto.SecretKeyFactory |
skf |
| Modifier | Constructor and Description |
|---|---|
|
LunaKeyDerivationPRFKDF() |
protected |
LunaKeyDerivationPRFKDF(long mechType,
long prfType,
long counter,
long encodingScheme) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkPublicKey(java.security.Key key,
boolean lastPhase) |
protected java.security.Key |
engineDoPhase(java.security.Key key,
boolean lastPhase) |
protected byte[] |
engineGenerateSecret() |
protected int |
engineGenerateSecret(byte[] sharedSecret,
int offset) |
protected javax.crypto.SecretKey |
engineGenerateSecret(java.lang.String algorithm) |
protected void |
engineInit(java.security.Key key,
java.security.spec.AlgorithmParameterSpec paramSpec,
java.security.SecureRandom random) |
protected void |
engineInit(java.security.Key key,
java.security.SecureRandom random) |
protected int |
getDerivedKeyLength(long algId) |
protected int |
getMaxSharedSecretLength() |
protected long mechType
protected long prfType
protected long counter
protected long encodingScheme
protected byte[] label
protected byte[] context
protected java.security.AlgorithmParameters mAlgParams
protected LunaKey baseKey
protected final javax.crypto.SecretKeyFactory skf
public LunaKeyDerivationPRFKDF()
protected LunaKeyDerivationPRFKDF(long mechType,
long prfType,
long counter,
long encodingScheme)
protected void engineInit(java.security.Key key,
java.security.SecureRandom random)
throws java.security.InvalidKeyException
engineInit in class javax.crypto.KeyAgreementSpijava.security.InvalidKeyExceptionprotected void engineInit(java.security.Key key,
java.security.spec.AlgorithmParameterSpec paramSpec,
java.security.SecureRandom random)
throws java.security.InvalidKeyException
java.security.InvalidKeyExceptionprotected javax.crypto.SecretKey engineGenerateSecret(java.lang.String algorithm)
throws java.lang.IllegalStateException,
java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
engineGenerateSecret in class javax.crypto.KeyAgreementSpijava.lang.IllegalStateExceptionjava.security.NoSuchAlgorithmExceptionjava.security.InvalidKeyExceptionprotected java.security.Key engineDoPhase(java.security.Key key,
boolean lastPhase)
throws java.security.InvalidKeyException,
java.lang.IllegalStateException
engineDoPhase in class javax.crypto.KeyAgreementSpijava.security.InvalidKeyExceptionjava.lang.IllegalStateExceptionprotected int getMaxSharedSecretLength()
protected void checkPublicKey(java.security.Key key,
boolean lastPhase)
throws java.security.InvalidKeyException,
java.lang.IllegalStateException
java.security.InvalidKeyExceptionjava.lang.IllegalStateExceptionprotected byte[] engineGenerateSecret()
throws java.lang.IllegalStateException
engineGenerateSecret in class javax.crypto.KeyAgreementSpijava.lang.IllegalStateExceptionprotected int engineGenerateSecret(byte[] sharedSecret,
int offset)
throws java.lang.IllegalStateException,
javax.crypto.ShortBufferException
engineGenerateSecret in class javax.crypto.KeyAgreementSpijava.lang.IllegalStateExceptionjavax.crypto.ShortBufferExceptionprotected int getDerivedKeyLength(long algId)
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmExceptionCopyright 2014-2018 SafeNet. All rights reserved.