Class RSAParameterSpec

  • All Implemented Interfaces:
    AlgorithmParameterSpec

    public final class RSAParameterSpec
    extends Object
    implements AlgorithmParameterSpec
    Algorithm parameter specification for RSA keys. RSA keys do not support a parameter object, but it does in fact have a parameter: the modulus. The methods on KeyUtil will therefore treat this class as the parameter type.
    Author:
    David M. Lloyd
    • Constructor Detail

      • RSAParameterSpec

        public RSAParameterSpec​(BigInteger modulus)
        Construct a new instance.
        Parameters:
        modulus - the modulus (must not be null)
      • RSAParameterSpec

        public RSAParameterSpec​(RSAKey rsaKey)
        Construct a new instance.
        Parameters:
        rsaKey - the RSA key from which the modulus should be acquired (must not be null)
    • Method Detail

      • getModulus

        public BigInteger getModulus()
        Get the modulus.
        Returns:
        the modulus (not null)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object