net.schmizz.sshj.userauth.keyprovider
Class KeyProviderUtil
java.lang.Object
net.schmizz.sshj.userauth.keyprovider.KeyProviderUtil
public class KeyProviderUtil
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KeyProviderUtil
public KeyProviderUtil()
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 stringseparatePubKey
- 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.