Package org.jose4j.jwe
Class AesCbcHmacSha2ContentEncryptionAlgorithm
java.lang.Object
org.jose4j.jwa.AlgorithmInfo
org.jose4j.jwe.AesCbcHmacSha2ContentEncryptionAlgorithm
- All Implemented Interfaces:
Algorithm,ContentEncryptionAlgorithm
- Direct Known Subclasses:
AesCbcHmacSha2ContentEncryptionAlgorithm.Aes128CbcHmacSha256,AesCbcHmacSha2ContentEncryptionAlgorithm.Aes192CbcHmacSha384,AesCbcHmacSha2ContentEncryptionAlgorithm.Aes256CbcHmacSha512
public class AesCbcHmacSha2ContentEncryptionAlgorithm
extends AlgorithmInfo
implements ContentEncryptionAlgorithm
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
FieldsFields inherited from class org.jose4j.jwa.AlgorithmInfo
log -
Constructor Summary
ConstructorsConstructorDescriptionAesCbcHmacSha2ContentEncryptionAlgorithm(String alg, int cekByteLen, String javaHmacAlg, int tagTruncationLength) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]decrypt(ContentEncryptionParts contentEncryptionParts, byte[] aad, byte[] contentEncryptionKey, Headers headers, ProviderContext providerContext) encrypt(byte[] plaintext, byte[] aad, byte[] contentEncryptionKey, Headers headers, byte[] ivOverride, ProviderContext providerContext) intbooleanMethods inherited from class org.jose4j.jwa.AlgorithmInfo
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jose4j.jwa.Algorithm
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType
-
Field Details
-
IV_BYTE_LENGTH
public static final int IV_BYTE_LENGTH- See Also:
-
-
Constructor Details
-
AesCbcHmacSha2ContentEncryptionAlgorithm
-
-
Method Details
-
getHmacJavaAlgorithm
-
getTagTruncationLength
public int getTagTruncationLength() -
getContentEncryptionKeyDescriptor
- Specified by:
getContentEncryptionKeyDescriptorin interfaceContentEncryptionAlgorithm
-
encrypt
public ContentEncryptionParts encrypt(byte[] plaintext, byte[] aad, byte[] contentEncryptionKey, Headers headers, byte[] ivOverride, ProviderContext providerContext) throws JoseException - Specified by:
encryptin interfaceContentEncryptionAlgorithm- Throws:
JoseException
-
decrypt
public byte[] decrypt(ContentEncryptionParts contentEncryptionParts, byte[] aad, byte[] contentEncryptionKey, Headers headers, ProviderContext providerContext) throws JoseException - Specified by:
decryptin interfaceContentEncryptionAlgorithm- Throws:
JoseException
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceAlgorithm
-