Interface SshHmac
- All Superinterfaces:
Component,SecureComponent,SshComponent
- All Known Implementing Classes:
AbstractHmac,HmacMD5,HmacMD596,HmacMD5ETM,HmacRipeMd160,HmacRipeMd160ETM,HmacSha1,HmacSha196,HmacSha1ETM,HmacSha256,HmacSha256_96,HmacSha256_at_ssh_dot_com,HmacSha256ETM,HmacSha512,HmacSha512_96,HmacSha512ETM,NoneHmac
This interface should be implemented by all message authentication
implementations.
- Author:
- Lee David Painter
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]doFinal()voidgenerate(long sequenceNo, byte[] data, int offset, int len, byte[] output, int start) intThe length of the message digest output by this implementation (maybe lower than mac size);intThe size of the message digest output by the hmac algorithmvoidinit(byte[] keydata) booleanisETM()voidupdate(byte[] b) booleanverify(long sequenceNo, byte[] data, int start, int len, byte[] mac, int offset) Methods inherited from interface com.sshtools.common.ssh.SecureComponent
getPriority, getSecurityLevel
-
Method Details
-
getMacSize
int getMacSize()The size of the message digest output by the hmac algorithm- Returns:
-
getMacLength
int getMacLength()The length of the message digest output by this implementation (maybe lower than mac size);- Returns:
-
generate
void generate(long sequenceNo, byte[] data, int offset, int len, byte[] output, int start) -
init
- Throws:
SshException
-
verify
boolean verify(long sequenceNo, byte[] data, int start, int len, byte[] mac, int offset) -
update
void update(byte[] b) -
doFinal
byte[] doFinal() -
getAlgorithm
String getAlgorithm()- Specified by:
getAlgorithmin interfaceSecureComponent- Specified by:
getAlgorithmin interfaceSshComponent
-
isETM
boolean isETM()
-