com.sshtools.j2ssh.openssh

Class OpenSSHPrivateKeyFormat

Implemented Interfaces:
SshPrivateKeyFormat

public class OpenSSHPrivateKeyFormat
extends java.lang.Object
implements SshPrivateKeyFormat

Version:
$Revision: 1.12 $
Author:
$author$

Constructor Summary

OpenSSHPrivateKeyFormat()
Creates a new OpenSSHPrivateKeyFormat object.

Method Summary

byte[]
decryptKeyblob(byte[] formattedKey, String passphrase)
byte[]
encryptKeyblob(byte[] keyblob, String passphrase)
String
getFormatType()
boolean
isFormatted(byte[] formattedKey)
boolean
isPassphraseProtected(byte[] formattedKey)
boolean
supportsAlgorithm(String algorithm)
String
toString()

Constructor Details

OpenSSHPrivateKeyFormat

public OpenSSHPrivateKeyFormat()
Creates a new OpenSSHPrivateKeyFormat object.

Method Details

decryptKeyblob

public byte[] decryptKeyblob(byte[] formattedKey,
                             String passphrase)
            throws InvalidSshKeyException
Specified by:
decryptKeyblob in interface SshPrivateKeyFormat
Parameters:
formattedKey -
passphrase -
Returns:

encryptKeyblob

public byte[] encryptKeyblob(byte[] keyblob,
                             String passphrase)
            throws InvalidSshKeyException
Specified by:
encryptKeyblob in interface SshPrivateKeyFormat
Parameters:
keyblob -
passphrase -
Returns:

getFormatType

public String getFormatType()
Specified by:
getFormatType in interface SshPrivateKeyFormat
Returns:

isFormatted

public boolean isFormatted(byte[] formattedKey)
Specified by:
isFormatted in interface SshPrivateKeyFormat
Parameters:
formattedKey -
Returns:

isPassphraseProtected

public boolean isPassphraseProtected(byte[] formattedKey)
Specified by:
isPassphraseProtected in interface SshPrivateKeyFormat
Parameters:
formattedKey -
Returns:

supportsAlgorithm

public boolean supportsAlgorithm(String algorithm)
Specified by:
supportsAlgorithm in interface SshPrivateKeyFormat
Parameters:
algorithm -
Returns:

toString

public String toString()
Returns:

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