Secure iNet Factory

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

java.lang.Object
  extended by com.jscape.inet.ssh.transport.keyformat.KeyFormat
      extended by com.jscape.inet.ssh.transport.keyformat.DSSKeyFormat

public class DSSKeyFormat
extends KeyFormat

Version:
1.0
Author:
Alex Usun

Field Summary
static java.lang.String ALGORITHM
          The SSH algorithm name
static java.lang.String JAVA_ALGORITHM
          The Java algorithm name
 
Constructor Summary
DSSKeyFormat()
           
 
Method Summary
 byte[] format(java.security.PublicKey key)
           
 java.security.KeyPair generateKeyPair()
           
 java.security.PublicKey getKeyFrom(byte[] data)
           
 byte[] getSignatureFrom(byte[] data)
          Method getSignatureFrom
 byte[] sign(byte[] data, java.security.PrivateKey key)
          Method sign
 void verifySignature(byte[] sign, byte[] data, java.security.PublicKey key)
           
 
Methods inherited from class com.jscape.inet.ssh.transport.keyformat.KeyFormat
getAlgorithm
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALGORITHM

public static final java.lang.String ALGORITHM
The SSH algorithm name

See Also:
Constant Field Values

JAVA_ALGORITHM

public static final java.lang.String JAVA_ALGORITHM
The Java algorithm name

See Also:
Constant Field Values
Constructor Detail

DSSKeyFormat

public DSSKeyFormat()
Method Detail

getKeyFrom

public java.security.PublicKey getKeyFrom(byte[] data)
                                   throws KeyFormatException
Specified by:
getKeyFrom in class KeyFormat
Parameters:
data -
Returns:
public key
Throws:
KeyFormatException

format

public byte[] format(java.security.PublicKey key)
              throws KeyFormatException
Specified by:
format in class KeyFormat
Parameters:
key -
Returns:
byte array
Throws:
KeyFormatException

getSignatureFrom

public byte[] getSignatureFrom(byte[] data)
                        throws KeyFormatException
Method getSignatureFrom

Specified by:
getSignatureFrom in class KeyFormat
Returns:
byte array
Throws:
KeyFormatException
See Also:
KeyFormat.getSignatureFrom(byte[])

sign

public byte[] sign(byte[] data,
                   java.security.PrivateKey key)
            throws KeyFormatException
Method sign

Specified by:
sign in class KeyFormat
Returns:
byte array
Throws:
KeyFormatException
See Also:
KeyFormat.sign(byte[], PrivateKey)

verifySignature

public void verifySignature(byte[] sign,
                            byte[] data,
                            java.security.PublicKey key)
                     throws KeyFormatException
Specified by:
verifySignature in class KeyFormat
Parameters:
sign -
data -
key -
Throws:
KeyFormatException

generateKeyPair

public java.security.KeyPair generateKeyPair()
                                      throws KeyFormatException
Specified by:
generateKeyPair in class KeyFormat
Returns:
key pair
Throws:
KeyFormatException

Secure iNet Factory

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