Class PssParameters


  • public class PssParameters
    extends Object
    PSS parameters.
    Since:
    5.4RC1
    Version:
    $Id: 039f72d61129ef3c5e5675e24148a6709f63e3ca $
    • Constructor Detail

      • PssParameters

        public PssParameters()
        Construct default RSASSA-PSS parameters according to PKCS #1 definition of default value.
      • PssParameters

        public PssParameters​(String hashAlgorithm)
        Construct RSASSA-PSS parameters using default trailer and the same digest algorithm for both hash and mgf1.
        Parameters:
        hashAlgorithm - digest algorithm to use for hash and mgf1.
      • PssParameters

        public PssParameters​(String hashAlgorithm,
                             int saltLength)
        Construct RSASSA-PSS parameters using default trailer and the same digest algorithm for both hash and mgf1.
        Parameters:
        hashAlgorithm - digest algorithm to use for hash and mgf1.
        saltLength - size of salt in bytes.
      • PssParameters

        public PssParameters​(String hashAlgorithm,
                             String maskGenAlgorithm,
                             int saltLength)
        Construct RSASSA-PSS parameters using custom parameters.
        Parameters:
        hashAlgorithm - digest algorithm to use for hash.
        maskGenAlgorithm - digest algorithm to use for mgf1.
        saltLength - size of salt in bytes, -1 means use the digest size.
      • PssParameters

        public PssParameters​(String hashAlgorithm,
                             String maskGenAlgorithm,
                             int saltLength,
                             int trailerField)
        Construct RSASSA-PSS parameters using custom parameters.
        Parameters:
        hashAlgorithm - digest algorithm to use for hash.
        maskGenAlgorithm - digest algorithm to use for mgf1.
        saltLength - size of salt in bytes, -1 means use the digest size.
        trailerField - trailer selection, only valid value is 1.
    • Method Detail

      • getHashAlgorithm

        public String getHashAlgorithm()
        Returns:
        digest algorithm to use for hash.
      • getMaskGenAlgorithm

        public String getMaskGenAlgorithm()
        Returns:
        digest algorithm to use for mgf1.
      • getSaltLength

        public int getSaltLength()
        Returns:
        size of salt in bytes.
      • getTrailerField

        public int getTrailerField()
        Returns:
        trailer field.
      • getTrailerByte

        public byte getTrailerByte()
        Returns:
        trailer byte.