com.sshtools.j2ssh.transport.publickey
Class SshPrivateKeyFile
java.lang.Object
com.sshtools.j2ssh.transport.publickey.SshPrivateKeyFile
public class SshPrivateKeyFile
- extends java.lang.Object
- Version:
- $Revision: 1.21 $
- Author:
- $author$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SshPrivateKeyFile
protected SshPrivateKeyFile(byte[] keyblob,
SshPrivateKeyFormat format)
- Creates a new SshPrivateKeyFile object.
- Parameters:
keyblob
- format
-
getBytes
public byte[] getBytes()
- Returns:
getKeyBlob
public byte[] getKeyBlob(java.lang.String passphrase)
throws InvalidSshKeyException
- Parameters:
passphrase
-
- Returns:
-
- Throws:
InvalidSshKeyException
changePassphrase
public void changePassphrase(java.lang.String oldPassphrase,
java.lang.String newPassphrase)
throws InvalidSshKeyException
- Parameters:
oldPassphrase
- newPassphrase
-
- Throws:
InvalidSshKeyException
parse
public static SshPrivateKeyFile parse(byte[] formattedKey)
throws InvalidSshKeyException
- Parameters:
formattedKey
-
- Returns:
-
- Throws:
InvalidSshKeyException
parse
public static SshPrivateKeyFile parse(java.io.File keyfile)
throws InvalidSshKeyException,
java.io.IOException
- Parameters:
keyfile
-
- Returns:
-
- Throws:
InvalidSshKeyException
java.io.IOException
isPassphraseProtected
public boolean isPassphraseProtected()
- Returns:
create
public static SshPrivateKeyFile create(SshPrivateKey key,
java.lang.String passphrase,
SshPrivateKeyFormat format)
throws InvalidSshKeyException
- Throws:
InvalidSshKeyException
setFormat
public void setFormat(SshPrivateKeyFormat newFormat,
java.lang.String passphrase)
throws InvalidSshKeyException
- Parameters:
newFormat
- passphrase
-
- Throws:
InvalidSshKeyException
getFormat
public SshPrivateKeyFormat getFormat()
- Returns:
toPrivateKey
public SshPrivateKey toPrivateKey(java.lang.String passphrase)
throws InvalidSshKeyException
- Parameters:
passphrase
-
- Returns:
-
- Throws:
InvalidSshKeyException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.