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
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic class -
Field Summary
Fields inherited from class AlgorithmInfo
log -
Constructor Summary
Constructors -
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) booleanMethods 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
-
AesGcmContentEncryptionAlgorithm
-
-
Method Details
-
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
-
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:
decryptin interfaceContentEncryptionAlgorithm- Throws:
JoseException
-
isAvailable
public boolean isAvailable()- Specified by:
isAvailablein interfaceAlgorithm
-