public class PuTTYKeyFile extends java.lang.Object implements FileKeyProvider
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
Modifier and Type | Class and Description |
---|---|
static class |
PuTTYKeyFile.Factory |
Modifier and Type | Field and Description |
---|---|
protected PasswordFinder |
pwdf |
protected Resource<?> |
resource |
Constructor and Description |
---|
PuTTYKeyFile() |
Modifier and Type | Method and Description |
---|---|
java.security.PrivateKey |
getPrivate() |
java.security.PublicKey |
getPublic() |
KeyType |
getType()
Key type.
|
void |
init(java.io.File location) |
void |
init(java.io.File location,
PasswordFinder pwdf) |
void |
init(java.io.Reader location) |
void |
init(java.io.Reader location,
PasswordFinder pwdf) |
void |
init(java.lang.String privateKey,
java.lang.String publicKey) |
void |
init(java.lang.String privateKey,
java.lang.String publicKey,
PasswordFinder pwdf) |
boolean |
isEncrypted() |
protected void |
parseKeyPair() |
protected java.security.KeyPair |
readKeyPair() |
protected PasswordFinder pwdf
protected Resource<?> resource
public void init(java.io.Reader location)
init
in interface FileKeyProvider
public void init(java.io.Reader location, PasswordFinder pwdf)
init
in interface FileKeyProvider
public void init(java.io.File location)
init
in interface FileKeyProvider
public void init(java.io.File location, PasswordFinder pwdf)
init
in interface FileKeyProvider
public void init(java.lang.String privateKey, java.lang.String publicKey)
init
in interface FileKeyProvider
public void init(java.lang.String privateKey, java.lang.String publicKey, PasswordFinder pwdf)
init
in interface FileKeyProvider
public java.security.PrivateKey getPrivate() throws java.io.IOException
getPrivate
in interface KeyProvider
java.io.IOException
- if there is an I/O error retrieving the private keypublic java.security.PublicKey getPublic() throws java.io.IOException
getPublic
in interface KeyProvider
java.io.IOException
- if there is an I/O error retrieving the public keypublic KeyType getType() throws java.io.IOException
getType
in interface KeyProvider
KeyType
.java.io.IOException
- if there is an I/O error retrieving the key typepublic boolean isEncrypted()
protected java.security.KeyPair readKeyPair() throws java.io.IOException
java.io.IOException
protected void parseKeyPair() throws java.io.IOException
java.io.IOException