Top Methods
org.keycloak.jose.jwe.enc

public Interface JWEEncryptionProvider

Known Direct Implementers
org.keycloak.jose.jwe.enc.AesCbcHmacShaEncryptionProvider, org.keycloak.jose.jwe.enc.AesGcmEncryptionProvider
Imports
java.io.IOException, java.security.GeneralSecurityException, .Key, org.keycloak.jose.jwe.JWE, .JWEKeyStorage

Author
Marek Posolda

Method Summary

Modifier and TypeMethod and Description
public void
deserializeCEK(JWEKeyStorage keyStorage)

This method is supposed to deserialize keys.

public 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

public int
public byte[]
serializeCEK(JWEKeyStorage keyStorage)

This method requires that decoded CEK keys are present in the keyStorage.decodedCEK map before it's called

public void
verifyAndDecodeJwe(JWE jwe)

This method is supposed to verify checksums and decrypt content.

Method Detail

deserializeCEKback to summary
public void deserializeCEK(JWEKeyStorage keyStorage)

This method is supposed to deserialize keys. It requires that 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.

encodeJweback to summary
public void encodeJwe(JWE jwe) throws Exception

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

getExpectedCEKLengthback to summary
public int getExpectedCEKLength()
serializeCEKback to summary
public byte[] serializeCEK(JWEKeyStorage keyStorage)

This method requires that decoded CEK keys are present in the keyStorage.decodedCEK map before it's called

verifyAndDecodeJweback to summary
public void verifyAndDecodeJwe(JWE jwe) throws Exception

This method is supposed to verify checksums and decrypt content. Then it needs to call JWE#content(byte[]) after it's finished