Class BaseFileKeyProvider
java.lang.Object
net.schmizz.sshj.userauth.keyprovider.BaseFileKeyProvider
- All Implemented Interfaces:
FileKeyProvider
,KeyProvider
- Direct Known Subclasses:
OpenSSHKeyV1KeyFile
,PKCS8KeyFile
,PuTTYKeyFile
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()
void
void
init
(File location, PasswordFinder pwdf) void
void
init
(Reader location, PasswordFinder pwdf) void
void
init
(String privateKey, String publicKey, PasswordFinder pwdf) protected abstract KeyPair
-
Field Details
-
resource
-
pwdf
-
kp
-
type
-
-
Constructor Details
-
BaseFileKeyProvider
public BaseFileKeyProvider()
-
-
Method Details
-
init
- Specified by:
init
in interfaceFileKeyProvider
-
init
- Specified by:
init
in interfaceFileKeyProvider
-
init
- Specified by:
init
in interfaceFileKeyProvider
-
init
- Specified by:
init
in interfaceFileKeyProvider
-
init
- Specified by:
init
in interfaceFileKeyProvider
-
init
- Specified by:
init
in interfaceFileKeyProvider
-
getPrivate
- Specified by:
getPrivate
in interfaceKeyProvider
- Returns:
- the private key.
- Throws:
IOException
- if there is an I/O error retrieving the private key
-
getPublic
- Specified by:
getPublic
in interfaceKeyProvider
- Returns:
- the public key.
- Throws:
IOException
- if there is an I/O error retrieving the public key
-
getType
- Specified by:
getType
in interfaceKeyProvider
- Returns:
- the
KeyType
. - Throws:
IOException
- if there is an I/O error retrieving the key type
-
readKeyPair
- Throws:
IOException
-