Class PuTTYKeyFile
- java.lang.Object
-
- net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
-
- net.schmizz.sshj.userauth.keyprovider.PuTTYKeyFile
-
- All Implemented Interfaces:
FileKeyProvider,KeyProvider
public class PuTTYKeyFile extends BaseFileKeyProvider
Sample PuTTY file format
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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPuTTYKeyFile.Factory
-
Field Summary
-
Fields inherited from class net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
kp, pwdf, resource, type
-
-
Constructor Summary
Constructors Constructor Description PuTTYKeyFile()
-
Method Summary
Modifier and Type Method Description intgetKeyFileVersion()KeyTypegetType()Key typebooleanisEncrypted()protected voidparseKeyPair()protected java.security.KeyPairreadKeyPair()-
Methods inherited from class net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
getPrivate, getPublic, init, init, init, init, init, init
-
-
-
-
Method Detail
-
getType
public KeyType getType() throws java.io.IOException
Key type- Specified by:
getTypein interfaceKeyProvider- Overrides:
getTypein classBaseFileKeyProvider- Returns:
- the
KeyType. - Throws:
java.io.IOException- if there is an I/O error retrieving the key type
-
isEncrypted
public boolean isEncrypted() throws java.io.IOException- Throws:
java.io.IOException
-
readKeyPair
protected java.security.KeyPair readKeyPair() throws java.io.IOException- Specified by:
readKeyPairin classBaseFileKeyProvider- Throws:
java.io.IOException
-
parseKeyPair
protected void parseKeyPair() throws java.io.IOException- Throws:
java.io.IOException
-
getKeyFileVersion
public int getKeyFileVersion()
-
-