Package com.browserup.bup.mitm.keys
Class RSAKeyGenerator
- java.lang.Object
-
- com.browserup.bup.mitm.keys.RSAKeyGenerator
-
- All Implemented Interfaces:
KeyGenerator
public class RSAKeyGenerator extends java.lang.Object implements KeyGenerator
AKeyGeneratorthat creates RSA key pairs.
-
-
Constructor Summary
Constructors Constructor Description RSAKeyGenerator()Create aKeyGeneratorthat will create a 2048-bit RSA key pair.RSAKeyGenerator(int keySize)Create aKeyGeneratorthat will create an RSA key pair of the specified keySize.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.KeyPairgenerate()Generates a new public/private key pair.java.lang.StringtoString()
-
-
-
Constructor Detail
-
RSAKeyGenerator
public RSAKeyGenerator()
Create aKeyGeneratorthat will create a 2048-bit RSA key pair.
-
RSAKeyGenerator
public RSAKeyGenerator(int keySize)
Create aKeyGeneratorthat 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:KeyGeneratorGenerates a new public/private key pair. This method should not cache or reuse any previously-generated key pairs.- Specified by:
generatein interfaceKeyGenerator- Returns:
- a new public/private key pair
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-