|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sshtools.j2ssh.transport.hmac.HmacSha
Implements the SHA Hash Message authentication algorithm
| Constructor Summary | |
HmacSha()
Constructor for the HmacSha object |
|
| Method Summary | |
byte[] |
generate(long sequenceNo,
byte[] data,
int offset,
int len)
Generates the mac |
int |
getMacLength()
Gets the mac length |
void |
init(byte[] keydata)
Initates the message authentication with the supplied key data |
boolean |
verify(long sequenceNo,
byte[] data)
Verifies the mac received |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HmacSha()
| Method Detail |
public void init(byte[] keydata)
throws AlgorithmInitializationException
init in interface SshHmackeydata - Key data produced during key
exchange
AlgorithmInitializationException - Thrown if the mac cannot be
initialized
public byte[] generate(long sequenceNo,
byte[] data,
int offset,
int len)
generate in interface SshHmacsequenceNo - The sequence no of the messagedata - The message dataoffset - Description of the Parameterlen - Description of the Parameter
public boolean verify(long sequenceNo,
byte[] data)
verify in interface SshHmacsequenceNo - The sequence no of the messagedata - The message data
public int getMacLength()
getMacLength in interface SshHmac
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||