| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private byte[] | |
| public void | deserializeCEK(JWEKeyStorage keyStorage)
Implements org. |
| public void | encodeJwe(JWE jwe)
Implements org. JWE#setEncryptedContentInfo(byte[], byte[], byte[]) after it's finished
|
| private byte[] | |
| private byte[] | |
| private byte[] | |
| private byte[] | |
| protected abstract int | |
| public byte[] | serializeCEK(JWEKeyStorage keyStorage)
Implements org. |
| public void | verifyAndDecodeJwe(JWE jwe)
Implements org. |
| AUTH_TAG_SIZE_BYTE | back to summary |
|---|---|
| private static final int AUTH_TAG_SIZE_BYTE | |
| IV_SIZE_BYTE | back to summary |
|---|---|
| private static final int IV_SIZE_BYTE | |
| AesGcmEncryptionProvider | back to summary |
|---|---|
| public AesGcmEncryptionProvider() | |
| decryptBytes | back to summary |
|---|---|
| private byte[] decryptBytes(byte[] encryptedBytes, byte[] ivBytes, Key aesKey, byte[] aad) throws GeneralSecurityException | |
| deserializeCEK | back to summary |
|---|---|
| public void deserializeCEK(JWEKeyStorage keyStorage) Implements org. Doc from org. This method is supposed to deserialize keys. It requires that
| |
| encodeJwe | back to summary |
|---|---|
| public void encodeJwe(JWE jwe) throws Exception Implements org. Doc from org. This method usually has 3 outputs:
- generated initialization vector
- encrypted content
- authenticationTag for MAC validation
It is supposed to call
| |
| encryptBytes | back to summary |
|---|---|
| private byte[] encryptBytes(byte[] contentBytes, byte[] ivBytes, Key aesKey, byte[] aad) throws GeneralSecurityException | |
| getAeadDecryptedTargetContent | back to summary |
|---|---|
| private byte[] getAeadDecryptedTargetContent(JWE jwe) | |
| getAuthenticationTag | back to summary |
|---|---|
| private byte[] getAuthenticationTag(byte[] cipherBytes) | |
| getEncryptedContent | back to summary |
|---|---|
| private byte[] getEncryptedContent(byte[] cipherBytes) throws NoSuchAlgorithmException, InvalidKeyException | |
| getExpectedAesKeyLength | back to summary |
|---|---|
| protected abstract int getExpectedAesKeyLength() | |
| serializeCEK | back to summary |
|---|---|
| public byte[] serializeCEK(JWEKeyStorage keyStorage) Implements org. Doc from org. This method requires that decoded CEK keys are present in the keyStorage.decodedCEK map before it's called
| |
| verifyAndDecodeJwe | back to summary |
|---|---|
| public void verifyAndDecodeJwe(JWE jwe) throws Exception Implements org. Doc from org. This method is supposed to verify checksums and decrypt content. Then it needs to call
| |