public final class JweUtils extends Object
public static String encrypt(PublicKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentAlgo, byte[] content)
public static String encrypt(PublicKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentAlgo, byte[] content, String ct)
public static String encrypt(SecretKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentAlgo, byte[] content)
public static String encrypt(SecretKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentAlgo, byte[] content, String ct)
public static String encrypt(JsonWebKey key, ContentAlgorithm contentAlgo, byte[] content, String ct)
public static String encryptDirect(SecretKey key, ContentAlgorithm contentAlgo, byte[] content)
public static String encryptDirect(SecretKey key, ContentAlgorithm contentAlgo, byte[] content, String ct)
public static String encryptDirect(JsonWebKey key, byte[] content, String ct)
public static byte[] decrypt(PrivateKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentAlgo, String content)
public static byte[] decrypt(SecretKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentAlgo, String content)
public static byte[] decrypt(JsonWebKey key, ContentAlgorithm contentAlgo, String content)
public static byte[] decryptDirect(SecretKey key, ContentAlgorithm contentAlgo, String content)
public static byte[] decryptDirect(JsonWebKey key, String content)
public static KeyEncryptionProvider getKeyEncryptionProvider(JsonWebKey jwk)
public static KeyEncryptionProvider getKeyEncryptionProvider(JsonWebKey jwk, KeyAlgorithm defaultAlgorithm)
public static KeyEncryptionProvider getPublicKeyEncryptionProvider(PublicKey key, KeyAlgorithm algo)
public static KeyEncryptionProvider getPublicKeyEncryptionProvider(PublicKey key, Properties props, KeyAlgorithm algo)
public static KeyEncryptionProvider getSecretKeyEncryptionAlgorithm(SecretKey key, KeyAlgorithm algo)
public static KeyDecryptionProvider getKeyDecryptionProvider(JsonWebKey jwk)
public static KeyDecryptionProvider getKeyDecryptionProvider(JsonWebKey jwk, KeyAlgorithm defaultAlgorithm)
public static KeyDecryptionProvider getPrivateKeyDecryptionProvider(PrivateKey key, KeyAlgorithm algo)
public static KeyDecryptionProvider getSecretKeyDecryptionProvider(SecretKey key, KeyAlgorithm algo)
public static ContentEncryptionProvider getContentEncryptionProvider(JsonWebKey jwk)
public static ContentEncryptionProvider getContentEncryptionProvider(JsonWebKey jwk, ContentAlgorithm defaultAlgorithm)
public static ContentEncryptionProvider getContentEncryptionProvider(SecretKey key, ContentAlgorithm algorithm)
public static ContentEncryptionProvider getContentEncryptionProvider(byte[] key, ContentAlgorithm algorithm)
public static ContentEncryptionProvider getContentEncryptionProvider(ContentAlgorithm algorithm)
public static ContentEncryptionProvider getContentEncryptionProvider(ContentAlgorithm algorithm, boolean generateCekOnce)
public static ContentDecryptionProvider getContentDecryptionProvider(ContentAlgorithm algorithm)
public static SecretKey getContentDecryptionSecretKey(JsonWebKey jwk)
public static SecretKey getContentDecryptionSecretKey(JsonWebKey jwk, String defaultAlgorithm)
public static JweEncryption getDirectKeyJweEncryption(JsonWebKey key)
public static JweEncryption getEcDirectKeyJweEncryption(JsonWebKey key, ContentAlgorithm ctAlgo)
public static JweEncryption getDirectKeyJweEncryption(SecretKey key, ContentAlgorithm algo)
public static JweEncryption getDirectKeyJweEncryption(byte[] key, ContentAlgorithm algo)
public static JweDecryption getDirectKeyJweDecryption(JsonWebKey key)
public static JweDecryption getDirectKeyJweDecryption(SecretKey key, ContentAlgorithm algorithm)
public static JweDecryption getDirectKeyJweDecryption(byte[] key, ContentAlgorithm algorithm)
public static JweDecryption getEcDirectKeyJweDecryption(JsonWebKey key, ContentAlgorithm ctAlgo)
public static JweEncryptionProvider loadEncryptionProvider(boolean required)
public static JweEncryptionProvider loadEncryptionProvider(JweHeaders headers, boolean required)
public static JweEncryptionProvider loadEncryptionProvider(Properties props, JweHeaders headers)
public static JweEncryptionProvider loadEncryptionProvider(Properties props, Message m, JweHeaders headers)
public static KeyEncryptionProvider loadKeyEncryptionProvider(Properties props, Message m, JweHeaders headers)
public static JweDecryptionProvider loadDecryptionProvider(boolean required)
public static JweDecryptionProvider loadDecryptionProvider(JweHeaders inHeaders, boolean required)
public static JweDecryptionProvider loadDecryptionProvider(Properties props, JweHeaders inHeaders)
public static JweEncryptionProvider createJweEncryptionProvider(PublicKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentEncryptionAlgo)
public static JweEncryptionProvider createJweEncryptionProvider(PublicKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentEncryptionAlgo, String compression)
public static JweEncryptionProvider createJweEncryptionProvider(PublicKey key, JweHeaders headers)
public static JweEncryptionProvider createJweEncryptionProvider(SecretKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentEncryptionAlgo)
public static JweEncryptionProvider createJweEncryptionProvider(SecretKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentEncryptionAlgo, String compression)
public static JweEncryptionProvider createJweEncryptionProvider(SecretKey key, JweHeaders headers)
public static JweEncryptionProvider createJweEncryptionProvider(JsonWebKey key, ContentAlgorithm contentEncryptionAlgo)
public static JweEncryptionProvider createJweEncryptionProvider(JsonWebKey key, ContentAlgorithm contentEncryptionAlgo, String compression)
public static JweEncryptionProvider createJweEncryptionProvider(JsonWebKey key, JweHeaders headers)
public static JweEncryptionProvider createJweEncryptionProvider(KeyEncryptionProvider keyEncryptionProvider, ContentAlgorithm contentEncryptionAlgo, String compression)
public static JweEncryptionProvider createJweEncryptionProvider(KeyEncryptionProvider keyEncryptionProvider, JweHeaders headers)
public static JweEncryptionProvider createJweEncryptionProvider(KeyEncryptionProvider keyEncryptionProvider, JweHeaders headers, boolean generateCekOnce)
public static JweDecryptionProvider createJweDecryptionProvider(PrivateKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentDecryptionAlgo)
public static JweDecryptionProvider createJweDecryptionProvider(SecretKey key, KeyAlgorithm keyAlgo, ContentAlgorithm contentDecryptionAlgo)
public static JweDecryptionProvider createJweDecryptionProvider(JsonWebKey key, ContentAlgorithm contentDecryptionAlgo)
public static JweDecryptionProvider createJweDecryptionProvider(KeyDecryptionProvider keyDecryptionProvider, ContentAlgorithm contentDecryptionAlgo)
public static boolean validateCriticalHeaders(JoseHeaders headers)
public static byte[] getECDHKey(JsonWebKey privateKey, JsonWebKey peerPublicKey, byte[] partyUInfo, byte[] partyVInfo, String algoName, int algoKeyBitLen)
public static byte[] getECDHKey(ECPrivateKey privateKey, ECPublicKey peerPublicKey, byte[] partyUInfo, byte[] partyVInfo, String algoName, int algoKeyBitLen)
public static byte[] getAdditionalAuthenticationData(String headersJson, byte[] aad)
public static KeyAlgorithm getKeyEncryptionAlgorithm(Message m, Properties props, KeyAlgorithm algo, KeyAlgorithm defaultAlgo)
public static KeyAlgorithm getKeyEncryptionAlgorithm(Properties props, KeyAlgorithm defaultAlgo)
public static KeyAlgorithm getKeyEncryptionAlgorithm(Message m, Properties props, KeyAlgorithm defaultAlgo)
public static ContentAlgorithm getContentEncryptionAlgorithm(Message m, Properties props, ContentAlgorithm algo, ContentAlgorithm defaultAlgo)
public static ContentAlgorithm getContentEncryptionAlgorithm(Properties props)
public static ContentAlgorithm getContentEncryptionAlgorithm(Properties props, ContentAlgorithm defaultAlgo)
public static ContentAlgorithm getContentEncryptionAlgorithm(Message m, Properties props, ContentAlgorithm defaultAlgo)
public static void validateJweCertificateChain(List<X509Certificate> certs)
public static Properties loadEncryptionInProperties(boolean required)
public static Properties loadEncryptionOutProperties(boolean required)
public static Properties loadEncryptionProperties(String propertiesName, boolean required)
public static void checkEncryptionKeySize(Key key)
public static JsonWebKeys loadPublicKeyEncryptionKeys(Message m, Properties props)
public static Properties loadJweProperties(Message m, String propLoc)
Apache CXF