public interface JWEEncryptionProvider
| Modifier and Type | Method and Description |
|---|---|
void |
deserializeCEK(JWEKeyStorage keyStorage)
This method is supposed to deserialize keys.
|
void |
encodeJwe(JWE jwe)
This method usually has 3 outputs:
- generated initialization vector
- encrypted content
- authenticationTag for MAC validation
It is supposed to call
JWE.setEncryptedContentInfo(byte[], byte[], byte[]) after it's finished |
int |
getExpectedCEKLength() |
byte[] |
serializeCEK(JWEKeyStorage keyStorage)
This method requires that decoded CEK keys are present in the keyStorage.decodedCEK map before it's called
|
void |
verifyAndDecodeJwe(JWE jwe)
This method is supposed to verify checksums and decrypt content.
|
void encodeJwe(JWE jwe) throws Exception
JWE.setEncryptedContentInfo(byte[], byte[], byte[]) after it's finishedjwe - IOExceptionGeneralSecurityExceptionExceptionvoid verifyAndDecodeJwe(JWE jwe) throws Exception
JWE.content(byte[]) after it's finishedjwe - IOExceptionGeneralSecurityExceptionExceptionbyte[] serializeCEK(JWEKeyStorage keyStorage)
keyStorage - void deserializeCEK(JWEKeyStorage keyStorage)
JWEKeyStorage.getCekBytes() is set. After keys are deserialized,
this method needs to call JWEKeyStorage.setCEKKey(Key, JWEKeyStorage.KeyUse) according to all uses, which this encryption algorithm requires.keyStorage - int getExpectedCEKLength()
Copyright © 2021 JBoss by Red Hat. All rights reserved.