com.sshtools.j2ssh.transport.hmac
Interface SshHmac

All Known Implementing Classes:
HmacSha

public interface SshHmac

This interface defines the SSH messase authentication methods

Version:
1.0
Author:
Lee David Painter ( lee@sshtools.com )

Method Summary
 byte[] generate(long sequenceNo, byte[] data, int offset, int len)
          Called to generate a mac
 int getMacLength()
          Gets the mac length
 void init(byte[] keydata)
          Called by the framework to initialize the mac
 boolean verify(long sequenceNo, byte[] data)
          Called to verify a mac
 

Method Detail

init

public void init(byte[] keydata)
          throws AlgorithmInitializationException
Called by the framework to initialize the mac

Parameters:
keydata - Key data produced during key exchange
Throws:
AlgorithmInitializationException - Throw if an initialization exception

generate

public byte[] generate(long sequenceNo,
                       byte[] data,
                       int offset,
                       int len)
Called to generate a mac

Parameters:
sequenceNo - The sequence no of the message
data - The message data
offset - Description of the Parameter
len - Description of the Parameter
Returns:
The mac

verify

public boolean verify(long sequenceNo,
                      byte[] data)
Called to verify a mac

Parameters:
sequenceNo - The sequence no of the message
data - The message data
Returns:
The result of the verification

getMacLength

public int getMacLength()
Gets the mac length

Returns:
The mac length


Copyright © 2002 Sshtools.com. All Rights Reserved.