public class PuTTYKey extends Object
PuTTY-User-Key-File-2: ssh-rsa Encryption: none Comment: rsa-key-20080514 Public-Lines: 4 AAAAB3NzaC1yc2EAAAABJQAAAIEAiPVUpONjGeVrwgRPOqy3Ym6kF/f8bltnmjA2 BMdAtaOpiD8A2ooqtLS5zWYuc0xkW0ogoKvORN+RF4JI+uNUlkxWxnzJM9JLpnvA HrMoVFaQ0cgDMIHtE1Ob1cGAhlNInPCRnGNJpBNcJ/OJye3yt7WqHP4SPCCLb6nL nmBUrLM= Private-Lines: 8 AAAAgGtYgJzpktzyFjBIkSAmgeVdozVhgKmF6WsDMUID9HKwtU8cn83h6h7ug8qA hUWcvVxO201/vViTjWVz9ALph3uMnpJiuQaaNYIGztGJBRsBwmQW9738pUXcsUXZ 79KJP01oHn6Wkrgk26DIOsz04QOBI6C8RumBO4+F1WdfueM9AAAAQQDmA4hcK8Bx nVtEpcF310mKD3nsbJqARdw5NV9kCxPnEsmy7Sy1L4Ob/nTIrynbc3MA9HQVJkUz 7V0va5Pjm/T7AAAAQQCYbnG0UEekwk0LG1Hkxh1OrKMxCw2KWMN8ac3L0LVBg/Tk 8EnB2oT45GGeJaw7KzdoOMFZz0iXLsVLNUjNn2mpAAAAQQCN6SEfWqiNzyc/w5n/ lFVDHExfVUJp0wXv+kzZzylnw4fs00lC3k4PZDSsb+jYCMesnfJjhDgkUA0XPyo8 Emdk Private-MAC: 50c45751d18d74c00fca395deb7b7695e3ed6f77
Constructor and Description |
---|
PuTTYKey(File ppkFile,
String passphrase) |
PuTTYKey(InputStream in,
String passphrase) |
PuTTYKey(Reader in,
String passphrase) |
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithm()
Key type.
|
static boolean |
isPuTTYKeyFile(File ppkFile)
Checks if the given file is a PuTTY's ".ppk" file, by looking at the file contents.
|
static boolean |
isPuTTYKeyFile(InputStream in) |
static boolean |
isPuTTYKeyFile(Reader _reader) |
String |
toOpenSSH()
Converts this key into OpenSSH format.
|
void |
toOpenSSH(File f)
Converts the key to OpenSSH format, then write it to a file.
|
public PuTTYKey(File ppkFile, String passphrase) throws IOException
IOException
public PuTTYKey(InputStream in, String passphrase) throws IOException
IOException
public PuTTYKey(Reader in, String passphrase) throws IOException
IOException
public String getAlgorithm()
public String toOpenSSH() throws IOException
IOException
public void toOpenSSH(File f) throws IOException
IOException
public static boolean isPuTTYKeyFile(File ppkFile) throws IOException
IOException
public static boolean isPuTTYKeyFile(InputStream in) throws IOException
IOException
public static boolean isPuTTYKeyFile(Reader _reader) throws IOException
IOException
Copyright © 2012. All Rights Reserved.