Class RSAKeyGenerator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.security.KeyPair generate()
      Generates a new public/private key pair.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • RSAKeyGenerator

        public RSAKeyGenerator()
        Create a KeyGenerator that will create a 2048-bit RSA key pair.
      • RSAKeyGenerator

        public RSAKeyGenerator​(int keySize)
        Create a KeyGenerator that will create an RSA key pair of the specified keySize.
        Parameters:
        keySize - keySize
    • Method Detail

      • generate

        public java.security.KeyPair generate()
        Description copied from interface: KeyGenerator
        Generates a new public/private key pair. This method should not cache or reuse any previously-generated key pairs.
        Specified by:
        generate in interface KeyGenerator
        Returns:
        a new public/private key pair
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object