Secure iNet Factory

com.jscape.inet.ssh.transport.keyformat
Class KeyFormat

java.lang.Object
  extended by com.jscape.inet.ssh.transport.keyformat.KeyFormat
Direct Known Subclasses:
DSSKeyFormat, RSAKeyFormat

public abstract class KeyFormat
extends java.lang.Object

Type KeyFormat

Version:
1.0
Author:
Alex

Method Summary
abstract  byte[] format(java.security.PublicKey key)
           
abstract  java.security.KeyPair generateKeyPair()
           
 java.lang.String getAlgorithm()
           
abstract  java.security.PublicKey getKeyFrom(byte[] data)
           
abstract  byte[] getSignatureFrom(byte[] data)
           
abstract  byte[] sign(byte[] data, java.security.PrivateKey key)
           
abstract  void verifySignature(byte[] sign, byte[] data, java.security.PublicKey key)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAlgorithm

public java.lang.String getAlgorithm()
Returns:
algorithm

getKeyFrom

public abstract java.security.PublicKey getKeyFrom(byte[] data)
                                            throws KeyFormatException
Parameters:
data -
Returns:
public key
Throws:
KeyFormatException

format

public abstract byte[] format(java.security.PublicKey key)
                       throws KeyFormatException
Parameters:
key -
Returns:
byte array
Throws:
KeyFormatException

getSignatureFrom

public abstract byte[] getSignatureFrom(byte[] data)
                                 throws KeyFormatException
Parameters:
data -
Returns:
byte array
Throws:
KeyFormatException

sign

public abstract byte[] sign(byte[] data,
                            java.security.PrivateKey key)
                     throws KeyFormatException
Parameters:
data -
key -
Returns:
byte array
Throws:
KeyFormatException

verifySignature

public abstract void verifySignature(byte[] sign,
                                     byte[] data,
                                     java.security.PublicKey key)
                              throws KeyFormatException
Parameters:
sign -
data -
key -
Throws:
KeyFormatException

generateKeyPair

public abstract java.security.KeyPair generateKeyPair()
                                               throws KeyFormatException
Returns:
key pair
Throws:
KeyFormatException

Secure iNet Factory

Copyright © JSCAPE LLC. 1999-2011. All Rights Reserved