Class XMLCipherUtil
java.lang.Object
org.apache.xml.security.encryption.XMLCipherUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final boolean
private static final org.slf4j.Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AlgorithmParameterSpec
constructBlockCipherParameters
(boolean gcmAlgorithm, byte[] iv, Class<?> callingClass) static AlgorithmParameterSpec
constructBlockCipherParameters
(String algorithm, byte[] iv, Class<?> callingClass) Build anAlgorithmParameterSpec
instance used to initialize aCipher
instance for block cipher encryption and decryption.private static AlgorithmParameterSpec
constructBlockCipherParametersForGCMAlgorithm
(String algorithm, byte[] iv, Class<?> callingClass)
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
gcmUseIvParameterSpec
private static final boolean gcmUseIvParameterSpec
-
-
Constructor Details
-
XMLCipherUtil
public XMLCipherUtil()
-
-
Method Details
-
constructBlockCipherParameters
public static AlgorithmParameterSpec constructBlockCipherParameters(String algorithm, byte[] iv, Class<?> callingClass) Build anAlgorithmParameterSpec
instance used to initialize aCipher
instance for block cipher encryption and decryption.- Parameters:
algorithm
- the XML encryption algorithm URIiv
- the initialization vector- Returns:
- the newly constructed AlgorithmParameterSpec instance, appropriate for the specified algorithm
-
constructBlockCipherParameters
public static AlgorithmParameterSpec constructBlockCipherParameters(boolean gcmAlgorithm, byte[] iv, Class<?> callingClass) -
constructBlockCipherParametersForGCMAlgorithm
private static AlgorithmParameterSpec constructBlockCipherParametersForGCMAlgorithm(String algorithm, byte[] iv, Class<?> callingClass)
-