public final class SSHPublicKeyExtractor extends Object
Constructor and Description |
---|
SSHPublicKeyExtractor() |
Modifier and Type | Method and Description |
---|---|
static String |
extract(String pem,
String passPhrase)
Extracts a SSH public key from a PEM-encoded SSH private key.
|
public static String extract(String pem, String passPhrase) throws IOException
pem
- The PEM-encoded string (either RSA or DSA).passPhrase
- The passphrase to decrypt the private key (may be null, if the key is not encrypted).IOException
- if pem could not be decoded properly.Copyright © 2016–2021. All rights reserved.