Class Transformation
java.lang.Object
org.apache.commons.crypto.utils.Transformation
Transformation algorithm, mode and padding, in the format "Algorithm/Mode/Padding", for example "AES/CBC/NoPadding".
- Since:
- 1.2.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateTransformation(String algorithm, String mode, String padding) Constructs a new instance.privateTransformation(String algorithm, String mode, Padding padding) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionGets the algorithm.getMode()Gets the mode.Gets the padding.static TransformationParses a transformation.
-
Field Details
-
T_DELIM_PARTS
private static final int T_DELIM_PARTS- See Also:
-
T_DELIM_REGEX
- See Also:
-
algorithm
-
mode
-
padding
-
-
Constructor Details
-
Transformation
-
Transformation
Constructs a new instance.- Parameters:
algorithm- the algorithm namemode- the mode namepadding- the padding name- Throws:
NoSuchPaddingException- Thrown when the padding is unsupported.
-
-
Method Details
-
parse
public static Transformation parse(String transformation) throws NoSuchAlgorithmException, NoSuchPaddingException Parses a transformation.- Parameters:
transformation- current transformation- Returns:
- the Transformation
- Throws:
NoSuchAlgorithmException- if the algorithm is not supportedNoSuchPaddingException- Thrown when the padding is unsupported.
-
getAlgorithm
-
getMode
-
getPadding
-