public class SshKeyUtils extends Object
Constructor and Description |
---|
SshKeyUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getFingerprint(SshPublicKey key) |
static String |
getFormattedKey(SshPublicKey key,
String comment) |
static String |
getFormattedKey(SshPublicKey key,
String comment,
int format) |
static String |
getOpenSSHFormattedKey(SshPublicKey key) |
static SshKeyPair |
getPrivateKey(File key,
String passphrase) |
static SshKeyPair |
getPrivateKey(InputStream key,
String passphrase) |
static SshKeyPair |
getPrivateKey(String formattedKey,
String passphrase) |
static SshPublicKey |
getPublicKey(File key) |
static SshPublicKey |
getPublicKey(InputStream key) |
static SshPublicKey |
getPublicKey(String formattedKey) |
public static String getOpenSSHFormattedKey(SshPublicKey key) throws IOException
IOException
public static String getFormattedKey(SshPublicKey key, String comment, int format) throws IOException
IOException
public static String getFormattedKey(SshPublicKey key, String comment) throws IOException
IOException
public static SshPublicKey getPublicKey(File key) throws IOException
IOException
public static SshPublicKey getPublicKey(InputStream key) throws IOException
IOException
public static SshPublicKey getPublicKey(String formattedKey) throws IOException
IOException
public static SshKeyPair getPrivateKey(File key, String passphrase) throws IOException, InvalidPassphraseException
public static SshKeyPair getPrivateKey(InputStream key, String passphrase) throws IOException, InvalidPassphraseException
public static SshKeyPair getPrivateKey(String formattedKey, String passphrase) throws IOException, InvalidPassphraseException
public static String getFingerprint(SshPublicKey key)
Copyright © 2017. All rights reserved.