Class RSAPrivateKey


  • public class RSAPrivateKey
    extends Key
    This class implements the RSA cryptographic cipher private key.
    • Constructor Summary

      Constructors 
      Constructor Description
      RSAPrivateKey​(byte[] e, byte[] d, byte[] n)
      Creates a new RSAPublicKey object, given the public and private exponents and the modulus.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getModulus()
      Returns a copy of the byte array containing the modulus.
      byte[] getPrivateExponent()
      Returns a copy of the byte array containing the private exponent.
      byte[] getPublicExponent()
      Returns a copy of the byte array containing the public exponent.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RSAPrivateKey

        public RSAPrivateKey​(byte[] e,
                             byte[] d,
                             byte[] n)
        Creates a new RSAPublicKey object, given the public and private exponents and the modulus.
        Parameters:
        e - A byte array containing the public exponent.
        d - A byte array containing the private exponent.
        n - A byte array containing the modulus.
    • Method Detail

      • getModulus

        public byte[] getModulus()
        Returns a copy of the byte array containing the modulus.
        Returns:
        A copy of the byte array containing the modulus.
      • getPublicExponent

        public byte[] getPublicExponent()
        Returns a copy of the byte array containing the public exponent.
        Returns:
        A copy of the byte array containing the public exponent.
      • getPrivateExponent

        public byte[] getPrivateExponent()
        Returns a copy of the byte array containing the private exponent.
        Returns:
        A copy of the byte array containing the private exponent.