com.sshtools.j2ssh.transport.hmac

Class HmacSha

Implemented Interfaces:
SshHmac
Known Direct Subclasses:
HmacSha96

public class HmacSha
extends java.lang.Object
implements SshHmac

Version:
$Revision: 1.20 $
Author:
$author$

Constructor Summary

HmacSha()
Creates a new HmacSha object.

Method Summary

byte[]
generate(long sequenceNo, byte[] data, int offset, int len)
int
getMacLength()
void
init(byte[] keydata)
boolean
verify(long sequenceNo, byte[] data)

Constructor Details

HmacSha

public HmacSha()
Creates a new HmacSha object.

Method Details

generate

public byte[] generate(long sequenceNo,
                       byte[] data,
                       int offset,
                       int len)
Specified by:
generate in interface SshHmac
Parameters:
sequenceNo -
data -
offset -
len -
Returns:

getMacLength

public int getMacLength()
Specified by:
getMacLength in interface SshHmac
Returns:

init

public void init(byte[] keydata)
            throws AlgorithmInitializationException
Specified by:
init in interface SshHmac
Parameters:
keydata -

verify

public boolean verify(long sequenceNo,
                      byte[] data)
Specified by:
verify in interface SshHmac
Parameters:
sequenceNo -
data -
Returns:

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