Class AsymmetricRSAPrivateKey

    • Constructor Detail

      • AsymmetricRSAPrivateKey

        public AsymmetricRSAPrivateKey​(Algorithm algorithm,
                                       java.math.BigInteger modulus,
                                       java.math.BigInteger publicExponent,
                                       java.math.BigInteger privateExponent,
                                       java.math.BigInteger p,
                                       java.math.BigInteger q,
                                       java.math.BigInteger dp,
                                       java.math.BigInteger dq,
                                       java.math.BigInteger qInv)
      • AsymmetricRSAPrivateKey

        public AsymmetricRSAPrivateKey​(Algorithm algorithm,
                                       java.math.BigInteger modulus,
                                       java.math.BigInteger privateExponent)
      • AsymmetricRSAPrivateKey

        public AsymmetricRSAPrivateKey​(Algorithm algorithm,
                                       byte[] privateKeyInfoEncoding)
    • Method Detail

      • getModulus

        public java.math.BigInteger getModulus()
        Return the modulus for this RSA key.
        Overrides:
        getModulus in class AsymmetricRSAKey
        Returns:
        the key's modulus.
      • getPublicExponent

        public java.math.BigInteger getPublicExponent()
      • getPrivateExponent

        public java.math.BigInteger getPrivateExponent()
      • getP

        public java.math.BigInteger getP()
      • getQ

        public java.math.BigInteger getQ()
      • getDP

        public java.math.BigInteger getDP()
      • getDQ

        public java.math.BigInteger getDQ()
      • getQInv

        public java.math.BigInteger getQInv()
      • getEncoded

        public final byte[] getEncoded()
        Description copied from interface: AsymmetricKey
        Return an ASN.1 encoding of the key wrapped in a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
        Specified by:
        getEncoded in interface AsymmetricKey
        Returns:
        an encoding of a PrivateKeyInfo or a SubjectPublicKeyInfo structure.
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.security.auth.Destroyable
      • isDestroyed

        public boolean isDestroyed()
        Specified by:
        isDestroyed in interface javax.security.auth.Destroyable
      • equals

        public boolean equals​(java.lang.Object o)
        Description copied from interface: Key
        Return true if o is an equivalent key to this.
        Specified by:
        equals in interface Key
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - object to compare to.
        Returns:
        true if o is the same or equivalent key, false otherwise.
      • hashCode

        public int hashCode()
        Description copied from interface: Key
        Return the hashCode for the key.
        Specified by:
        hashCode in interface Key
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        the key's hashCode.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable