Secure iNet Factory

com.jscape.inet.ssh.transport
Class KeyCreator

java.lang.Object
  extended by com.jscape.inet.ssh.transport.KeyCreator

public class KeyCreator
extends java.lang.Object

Version:
1.0
Author:
Alex Usun

Constructor Summary
KeyCreator(byte[] sharedSecret, byte[] exchangeHash, java.security.MessageDigest hash)
           
 
Method Summary
 byte[] createClientServerCipherKey(int keyLength)
           
 byte[] createClientServerIV(int keyLength)
           
 byte[] createClientServerMacKey(int keyLength)
           
 byte[] createServerClientCipherKey(int keyLength)
           
 byte[] createServerClientIV(int keyLength)
           
 byte[] createServerClientMacKey(int keyLength)
           
 byte[] getExchangeHash()
          Obtains the exchange hash value.
 void setSessionId(byte[] sessionId)
          Setups the current session ID.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyCreator

public KeyCreator(byte[] sharedSecret,
                  byte[] exchangeHash,
                  java.security.MessageDigest hash)
Parameters:
sharedSecret -
exchangeHash -
hash -
Method Detail

setSessionId

public void setSessionId(byte[] sessionId)
Setups the current session ID.

Parameters:
sessionId - the current session ID

getExchangeHash

public byte[] getExchangeHash()
Obtains the exchange hash value.

Returns:
the exchange hash value

createClientServerIV

public byte[] createClientServerIV(int keyLength)
                            throws TransportException
Parameters:
keyLength -
Returns:
byte array
Throws:
TransportException

createServerClientIV

public byte[] createServerClientIV(int keyLength)
                            throws TransportException
Parameters:
keyLength -
Returns:
byte array
Throws:
TransportException

createClientServerCipherKey

public byte[] createClientServerCipherKey(int keyLength)
                                   throws TransportException
Parameters:
keyLength -
Returns:
byte array
Throws:
TransportException

createServerClientCipherKey

public byte[] createServerClientCipherKey(int keyLength)
                                   throws TransportException
Parameters:
keyLength -
Returns:
byte array
Throws:
TransportException

createClientServerMacKey

public byte[] createClientServerMacKey(int keyLength)
                                throws TransportException
Parameters:
keyLength -
Returns:
byte array
Throws:
TransportException

createServerClientMacKey

public byte[] createServerClientMacKey(int keyLength)
                                throws TransportException
Parameters:
keyLength -
Returns:
byte array
Throws:
TransportException

Secure iNet Factory

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