Package org.wildfly.security.util
Interface TransformationMapper
-
- All Known Implementing Classes:
DefaultTransformationMapper
public interface TransformationMapper
TransformationMapper interface is used to map cipher tokens specified in various SASL mechanisms to transformation string used by JCE to construct new cipher algorithm.- Author:
- Peter Skopek
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TransformationSpec
getTransformationSpec(String mechanism, String token)
Get TransformationSpec with highest strength.TransformationSpec
getTransformationSpec(String provider, String mechanism, String token)
Get TransformationSpec with highest strength.TransformationSpec[]
getTransformationSpecByStrength(String mechanism, String... tokens)
Get ordered array of TransformationSpec by strength.TransformationSpec[]
getTransformationSpecByStrength(String provider, String mechanism, String... tokens)
Get ordered array of TransformationSpec by strength.TransformationSpec[]
getTransformationSpecWithStrength(String mechanism, int strength, String... tokens)
Get array of TransformationSpec with given strength.TransformationSpec[]
getTransformationSpecWithStrength(String provider, String mechanism, int strength, String... tokens)
Get array of TransformationSpec with given strength.
-
-
-
Method Detail
-
getTransformationSpec
TransformationSpec getTransformationSpec(String mechanism, String token) throws IllegalArgumentException
Get TransformationSpec with highest strength.- Parameters:
mechanism
- name as per specification. Cannot benull
.token
- name as per mechanism specification- Returns:
- TransformationSpec object
- Throws:
IllegalArgumentException
- if there is no such mechanism or token for the mechanism
-
getTransformationSpec
TransformationSpec getTransformationSpec(String provider, String mechanism, String token) throws IllegalArgumentException
Get TransformationSpec with highest strength.- Parameters:
provider
- name as defined by JCAmechanism
- name as per specification. Cannot benull
.token
- name as per mechanism specification- Returns:
- TransformationSpec object
- Throws:
IllegalArgumentException
- if there is no such mechanism or token for the mechanism
-
getTransformationSpecByStrength
TransformationSpec[] getTransformationSpecByStrength(String mechanism, String... tokens) throws IllegalArgumentException
Get ordered array of TransformationSpec by strength. Array is ordered from the highest strength to the lowest.- Parameters:
mechanism
- name as per specification. Cannot benull
.tokens
- - array of tokens to consider. Names as per mechanism specification.- Returns:
- ordered array of TransformationSpec
- Throws:
IllegalArgumentException
- if there is no such mechanism or token for the mechanism
-
getTransformationSpecByStrength
TransformationSpec[] getTransformationSpecByStrength(String provider, String mechanism, String... tokens) throws IllegalArgumentException
Get ordered array of TransformationSpec by strength. Array is ordered from the highest strength to the lowest.- Parameters:
provider
- name as defined by JCAmechanism
- name as per specification. Cannot benull
.tokens
- - array of tokens to consider. Names as per mechanism specification.- Returns:
- ordered array of TransformationSpec
- Throws:
IllegalArgumentException
- if there is no such mechanism or token for the mechanism
-
getTransformationSpecWithStrength
TransformationSpec[] getTransformationSpecWithStrength(String mechanism, int strength, String... tokens) throws IllegalArgumentException
Get array of TransformationSpec with given strength.- Parameters:
mechanism
- name as per specification. Cannot benull
.strength
- of desired transformationtokens
- - array of tokens to consider. Names as per mechanism specification.- Returns:
- array of TransformationSpec
- Throws:
IllegalArgumentException
- if there is no such mechanism or token for the mechanism
-
getTransformationSpecWithStrength
TransformationSpec[] getTransformationSpecWithStrength(String provider, String mechanism, int strength, String... tokens) throws IllegalArgumentException
Get array of TransformationSpec with given strength.- Parameters:
provider
- name as defined by JCAmechanism
- name as per specification. Cannot benull
.strength
- of desired transformationtokens
- - array of tokens to consider. Names as per mechanism specification.- Returns:
- array of TransformationSpec
- Throws:
IllegalArgumentException
- if there is no such mechanism or token for the mechanism
-
-