Class RSASSAPSSMechanismParams

  • All Implemented Interfaces:
    IApplicableSignatureParams, ISignatureMechanismParams

    public class RSASSAPSSMechanismParams
    extends java.lang.Object
    implements IApplicableSignatureParams
    Encode the signer's parameters for producing an RSASSA-PSS signature. Note that this class is intended for use in the signing process only, so it does not need to be able to represent all possible parameter configurations; only the ones we consider reasonable. For the purposes of this class, the mask generation function is always MGF1, and the associated digest function is the same as the digest function used in the signing process.
    • Field Detail

      • DEFAULT_TRAILER_FIELD

        public static final int DEFAULT_TRAILER_FIELD
        Default value of the trailer field parameter.
        See Also:
        Constant Field Values
      • saltLen

        private final int saltLen
      • trailerField

        private final int trailerField
    • Constructor Detail

      • RSASSAPSSMechanismParams

        public RSASSAPSSMechanismParams​(IASN1ObjectIdentifier digestAlgoOid,
                                        int saltLen,
                                        int trailerField)
        Instantiate RSASSA-PSS parameters with MGF1 for a given digest algorithm OID, salt length and trailer field value.
        Parameters:
        digestAlgoOid - the digest algorithm OID that will be used for both the digest and MGF
        saltLen - the salt length
        trailerField - the trailer field
    • Method Detail

      • createForDigestAlgorithm

        public static RSASSAPSSMechanismParams createForDigestAlgorithm​(java.lang.String digestAlgorithmName)
        Instantiate RSASSA-PSS parameters with MGF1 for the given algorithm name.
        Parameters:
        digestAlgorithmName - the name of the digest algorithm
        Returns:
        RSASSA-PSS parameters with MGF1 for the given algorithm name.
      • apply

        public void apply​(java.security.Signature signature)
        Apply the parameters to a Signature.
        Specified by:
        apply in interface IApplicableSignatureParams
        Parameters:
        signature - an uninitialised Signature object