net.schmizz.sshj.userauth.keyprovider
Class KeyProviderUtil

java.lang.Object
  extended by net.schmizz.sshj.userauth.keyprovider.KeyProviderUtil

public class KeyProviderUtil
extends Object


Constructor Summary
KeyProviderUtil()
           
 
Method Summary
static FileKeyProvider.Format detectKeyFileFormat(File location)
          Attempts to detect how a key file is encoded.
static FileKeyProvider.Format detectKeyFileFormat(String privateKey, boolean separatePubKey)
          Attempts to detect how a key file is encoded.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyProviderUtil

public KeyProviderUtil()
Method Detail

detectKeyFileFormat

public static FileKeyProvider.Format detectKeyFileFormat(File location)
                                                  throws IOException
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

detectKeyFileFormat

public static FileKeyProvider.Format detectKeyFileFormat(String privateKey,
                                                         boolean separatePubKey)
                                                  throws IOException
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


Copyright © 2009-2012. All Rights Reserved.