public class

KeyProviderUtil

extends Object
java.lang.Object
   ↳ net.schmizz.sshj.userauth.keyprovider.KeyProviderUtil

Summary

Public Constructors
KeyProviderUtil()
Public Methods
static FileKeyProvider.Format detectKeyFileFormat(String privateKey, boolean separatePubKey)
Attempts to detect how a key file is encoded.
static FileKeyProvider.Format detectKeyFileFormat(File location)
Attempts to detect how a key file is encoded.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public KeyProviderUtil ()

Public Methods

public static FileKeyProvider.Format detectKeyFileFormat (String privateKey, boolean separatePubKey)

Attempts to detect how a key file is encoded.

Return values are consistent with the NamedFactory implementations in the keyprovider package.

Parameters
privateKey Private key stored in a string
separatePubKey Is the public key stored separately from the private key
Returns
  • name of the key file format
Throws
IOException

public static FileKeyProvider.Format detectKeyFileFormat (File location)

Attempts to detect how a key file is encoded.

Return values are consistent with the NamedFactory implementations in the keyprovider package.

Parameters
location
Returns
  • name of the key file format
Throws
IOException