public class SSHKeyUtils extends Object
| Constructor and Description |
|---|
SSHKeyUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
encodePublicKey(RSAPublicKey key)
Encodes the public key according to some spec somewhere
|
static String |
generateKey(int keySize)
Generates a new SSH private key with specified keySize
|
static String |
getPublicKey(String privateKey,
String comment)
Gets the public key, with a comment for the given private key
|
public static String generateKey(int keySize)
keySize - size to use for the keypublic static String getPublicKey(String privateKey, String comment)
privateKey - SSH private key to usecomment - comment with the keypublic static byte[] encodePublicKey(RSAPublicKey key)
key - public key to useCopyright © 2016–2018. All rights reserved.