Class Pbes2HmacShaWithAesKeyWrapAlgorithm
java.lang.Object
org.jose4j.jwa.AlgorithmInfo
org.jose4j.jwe.Pbes2HmacShaWithAesKeyWrapAlgorithm
- All Implemented Interfaces:
Algorithm, KeyManagementAlgorithm
- Direct Known Subclasses:
Pbes2HmacShaWithAesKeyWrapAlgorithm.HmacSha256Aes128, Pbes2HmacShaWithAesKeyWrapAlgorithm.HmacSha384Aes192, Pbes2HmacShaWithAesKeyWrapAlgorithm.HmacSha512Aes256
public class Pbes2HmacShaWithAesKeyWrapAlgorithm
extends AlgorithmInfo
implements KeyManagementAlgorithm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
Fields inherited from class AlgorithmInfo
log -
Constructor Summary
ConstructorsConstructorDescriptionPbes2HmacShaWithAesKeyWrapAlgorithm(String alg, String hmacAlg, AesKeyWrapManagementAlgorithm keyWrapAlg) -
Method Summary
Modifier and TypeMethodDescriptionprotected KeyderiveForEncrypt(Key managementKey, Headers headers, ProviderContext providerContext) longintlongbooleanmanageForDecrypt(CryptoPrimitive cryptoPrimitive, byte[] encryptedKey, ContentEncryptionKeyDescriptor cekDesc, Headers headers, ProviderContext providerContext) manageForEncrypt(Key managementKey, ContentEncryptionKeyDescriptor cekDesc, Headers headers, byte[] cekOverride, ProviderContext providerContext) prepareForDecrypt(Key managementKey, Headers headers, ProviderContext providerContext) voidsetDefaultIterationCount(long defaultIterationCount) voidsetDefaultSaltByteLength(int defaultSaltByteLength) voidsetMaxIterationCount(long maxIterationCount) voidvalidateDecryptionKey(Key managementKey, ContentEncryptionAlgorithm contentEncryptionAlg) voidvalidateEncryptionKey(Key managementKey, ContentEncryptionAlgorithm contentEncryptionAlg) voidvalidateKey(Key managementKey) Methods inherited from class AlgorithmInfo
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType, toStringModifier and TypeMethodDescriptionvoidsetAlgorithmIdentifier(String algorithmIdentifier) voidsetJavaAlgorithm(String javaAlgorithm) voidsetKeyPersuasion(KeyPersuasion keyPersuasion) voidsetKeyType(String keyType) toString()
-
Constructor Details
-
Pbes2HmacShaWithAesKeyWrapAlgorithm
public Pbes2HmacShaWithAesKeyWrapAlgorithm(String alg, String hmacAlg, AesKeyWrapManagementAlgorithm keyWrapAlg)
-
-
Method Details
-
manageForEncrypt
public ContentEncryptionKeys manageForEncrypt(Key managementKey, ContentEncryptionKeyDescriptor cekDesc, Headers headers, byte[] cekOverride, ProviderContext providerContext) throws JoseException - Specified by:
manageForEncryptin interfaceKeyManagementAlgorithm- Throws:
JoseException
-
deriveForEncrypt
protected Key deriveForEncrypt(Key managementKey, Headers headers, ProviderContext providerContext) throws JoseException - Throws:
JoseException
-
prepareForDecrypt
public CryptoPrimitive prepareForDecrypt(Key managementKey, Headers headers, ProviderContext providerContext) throws JoseException - Specified by:
prepareForDecryptin interfaceKeyManagementAlgorithm- Throws:
JoseException
-
manageForDecrypt
public Key manageForDecrypt(CryptoPrimitive cryptoPrimitive, byte[] encryptedKey, ContentEncryptionKeyDescriptor cekDesc, Headers headers, ProviderContext providerContext) throws JoseException - Specified by:
manageForDecryptin interfaceKeyManagementAlgorithm- Throws:
JoseException
-
validateEncryptionKey
public void validateEncryptionKey(Key managementKey, ContentEncryptionAlgorithm contentEncryptionAlg) throws InvalidKeyException - Specified by:
validateEncryptionKeyin interfaceKeyManagementAlgorithm- Throws:
InvalidKeyException
-
validateDecryptionKey
public void validateDecryptionKey(Key managementKey, ContentEncryptionAlgorithm contentEncryptionAlg) throws InvalidKeyException - Specified by:
validateDecryptionKeyin interfaceKeyManagementAlgorithm- Throws:
InvalidKeyException
-
validateKey
- Throws:
InvalidKeyException
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceAlgorithm
-
getDefaultIterationCount
public long getDefaultIterationCount() -
setDefaultIterationCount
public void setDefaultIterationCount(long defaultIterationCount) -
getDefaultSaltByteLength
public int getDefaultSaltByteLength() -
setDefaultSaltByteLength
public void setDefaultSaltByteLength(int defaultSaltByteLength) -
getMaxIterationCount
public long getMaxIterationCount() -
setMaxIterationCount
public void setMaxIterationCount(long maxIterationCount)
-