Package org.jose4j.jwe
Class AesGcmContentEncryptionAlgorithm
java.lang.Object
org.jose4j.jwa.AlgorithmInfo
org.jose4j.jwe.AesGcmContentEncryptionAlgorithm
- All Implemented Interfaces:
Algorithm
,ContentEncryptionAlgorithm
- Direct Known Subclasses:
AesGcmContentEncryptionAlgorithm.Aes128Gcm
,AesGcmContentEncryptionAlgorithm.Aes192Gcm
,AesGcmContentEncryptionAlgorithm.Aes256Gcm
public class AesGcmContentEncryptionAlgorithm
extends AlgorithmInfo
implements ContentEncryptionAlgorithm
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
Fields inherited from class org.jose4j.jwa.AlgorithmInfo
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
decrypt
(ContentEncryptionParts contentEncParts, byte[] aad, byte[] contentEncryptionKey, Headers headers, ProviderContext providerContext) encrypt
(byte[] plaintext, byte[] aad, byte[] contentEncryptionKey, Headers headers, byte[] ivOverride, ProviderContext providerContext) boolean
Methods inherited from class org.jose4j.jwa.AlgorithmInfo
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType, setAlgorithmIdentifier, setJavaAlgorithm, setKeyPersuasion, setKeyType, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jose4j.jwa.Algorithm
getAlgorithmIdentifier, getJavaAlgorithm, getKeyPersuasion, getKeyType
-
Constructor Details
-
AesGcmContentEncryptionAlgorithm
-
-
Method Details
-
getContentEncryptionKeyDescriptor
- Specified by:
getContentEncryptionKeyDescriptor
in interfaceContentEncryptionAlgorithm
-
encrypt
public ContentEncryptionParts encrypt(byte[] plaintext, byte[] aad, byte[] contentEncryptionKey, Headers headers, byte[] ivOverride, ProviderContext providerContext) throws JoseException - Specified by:
encrypt
in interfaceContentEncryptionAlgorithm
- Throws:
JoseException
-
encrypt
public ContentEncryptionParts encrypt(byte[] plaintext, byte[] aad, byte[] contentEncryptionKey, byte[] iv, String provider) throws JoseException - Throws:
JoseException
-
decrypt
public byte[] decrypt(ContentEncryptionParts contentEncParts, byte[] aad, byte[] contentEncryptionKey, Headers headers, ProviderContext providerContext) throws JoseException - Specified by:
decrypt
in interfaceContentEncryptionAlgorithm
- Throws:
JoseException
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailable
in interfaceAlgorithm
-