Class WebStringPBEConfig

  • All Implemented Interfaces:
    PBECleanablePasswordConfig, PBEConfig, StringPBEConfig

    public class WebStringPBEConfig
    extends WebPBEConfig
    implements StringPBEConfig

    Implementation for StringPBEConfig which can be used from the Web PBE Config infrastructure (Filter + Servlet) to set the password for an encryptor from the web at initialization time.

    For an encryptor to be assigned a password from the web, it only has to be assigned a WebPBEConfig object, which must be initialized with both a unique name an a validation word. The name will identify the config object (and thus the encryptor) and the validation word will make sure that only an authorized person (for example, the application deployer) sets the passwords.

    As this class extends SimplePBEConfig, parameter values can be also set with the usual setX methods.

    For any of the configuration parameters, if its setX method is not called, a null value will be returned by the corresponding getX method.

    Since:
    1.3
    • Field Detail

      • stringOutputType

        private java.lang.String stringOutputType
    • Constructor Detail

      • WebStringPBEConfig

        public WebStringPBEConfig()

        Creates a new WebStringPBEConfig instance.

    • Method Detail

      • setStringOutputType

        public void setStringOutputType​(java.lang.String stringOutputType)

        Sets the the form in which String output will be encoded. Available encoding types are:

        • base64 (default)
        • hexadecimal

        If not set, null will be returned.

        Parameters:
        stringOutputType - the string output type.
      • getStringOutputType

        public java.lang.String getStringOutputType()
        Description copied from interface: StringPBEConfig

        This parameter lets the user specify the form in which String output will be encoded. Available encoding types are:

        • base64 (default)
        • hexadecimal
        Specified by:
        getStringOutputType in interface StringPBEConfig
        Returns:
        The name of the encoding type for String output