public class

PKCS8KeyFile

extends Object
implements FileKeyProvider
java.lang.Object
   ↳ net.schmizz.sshj.userauth.keyprovider.PKCS8KeyFile
Known Direct Subclasses

Class Overview

Represents a PKCS8-encoded key file. This is the format used by OpenSSH and OpenSSL.

Summary

Nested Classes
class PKCS8KeyFile.Factory  
Fields
protected KeyPair kp
protected final Logger log
protected char[] passphrase
protected PasswordFinder pwdf
protected Resource<?> resource
protected KeyType type
Public Constructors
PKCS8KeyFile()
Public Methods
PrivateKey getPrivate()
PublicKey getPublic()
KeyType getType()
void init(String privateKey, String publicKey, PasswordFinder pwdf)
void init(String privateKey, String publicKey)
void init(File location, PasswordFinder pwdf)
void init(File location)
String toString()
Protected Methods
PasswordFinder makeBouncyPasswordFinder()
KeyPair readKeyPair()
[Expand]
Inherited Methods
From class java.lang.Object
From interface net.schmizz.sshj.userauth.keyprovider.FileKeyProvider
From interface net.schmizz.sshj.userauth.keyprovider.KeyProvider

Fields

protected KeyPair kp

protected final Logger log

protected char[] passphrase

protected PasswordFinder pwdf

protected Resource<?> resource

protected KeyType type

Public Constructors

public PKCS8KeyFile ()

Public Methods

public PrivateKey getPrivate ()

Throws
IOException

public PublicKey getPublic ()

Throws
IOException

public KeyType getType ()

Throws
IOException

public void init (String privateKey, String publicKey, PasswordFinder pwdf)

Parameters
privateKey
publicKey
pwdf

public void init (String privateKey, String publicKey)

Parameters
privateKey
publicKey

public void init (File location, PasswordFinder pwdf)

Parameters
location
pwdf

public void init (File location)

Parameters
location

public String toString ()

Protected Methods

protected PasswordFinder makeBouncyPasswordFinder ()

protected KeyPair readKeyPair ()

Throws
IOException