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 Detail

      • getTransformationSpec

        TransformationSpec getTransformationSpec​(String mechanism,
                                                 String token)
                                          throws IllegalArgumentException
        Get TransformationSpec with highest strength.
        Parameters:
        mechanism - name as per specification. Cannot be null.
        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 JCA
        mechanism - name as per specification. Cannot be null.
        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 be null.
        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 JCA
        mechanism - name as per specification. Cannot be null.
        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 be null.
        strength - of desired transformation
        tokens - - 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 JCA
        mechanism - name as per specification. Cannot be null.
        strength - of desired transformation
        tokens - - 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