com.sshtools.j2ssh.transport.publickey

Class SshPublicKeyFile


public class SshPublicKeyFile
extends java.lang.Object

Version:
$Revision: 1.20 $
Author:
$author$

Constructor Summary

SshPublicKeyFile(byte[] keyblob, SshPublicKeyFormat format)
Creates a new SshPublicKeyFile object.

Method Summary

static SshPublicKeyFile
create(SshPublicKey key, SshPublicKeyFormat format)
String
getAlgorithm()
byte[]
getBytes()
String
getComment()
SshPublicKeyFormat
getFormat()
byte[]
getKeyBlob()
static SshPublicKeyFile
parse(File keyfile)
static SshPublicKeyFile
parse(byte[] formattedKey)
void
setComment(String comment)
void
setFormat(SshPublicKeyFormat newFormat)
SshPublicKey
toPublicKey()
String
toString()

Constructor Details

SshPublicKeyFile

protected SshPublicKeyFile(byte[] keyblob,
                           SshPublicKeyFormat format)
Creates a new SshPublicKeyFile object.
Parameters:
keyblob -
format -

Method Details

create

public static SshPublicKeyFile create(SshPublicKey key,
                                      SshPublicKeyFormat format)
Parameters:
key -
format -
Returns:

getAlgorithm

public String getAlgorithm()
Returns:

getBytes

public byte[] getBytes()
Returns:

getComment

public String getComment()
Returns:

getFormat

public SshPublicKeyFormat getFormat()
Returns:

getKeyBlob

public byte[] getKeyBlob()
Returns:

parse

public static SshPublicKeyFile parse(File keyfile)
            throws InvalidSshKeyException,
                   IOException
Parameters:
keyfile -
Returns:

parse

public static SshPublicKeyFile parse(byte[] formattedKey)
            throws InvalidSshKeyException
Parameters:
formattedKey -
Returns:

setComment

public void setComment(String comment)
Parameters:
comment -

setFormat

public void setFormat(SshPublicKeyFormat newFormat)
            throws InvalidSshKeyException
Parameters:
newFormat -

toPublicKey

public SshPublicKey toPublicKey()
            throws IOException
Returns:

toString

public String toString()
Returns:

Copyright © 2002-2003 Lee David Painter & Contributors. All Rights Reserved.