public abstract class AbstractHmac extends Object implements SshHmac
SshHmac
interface to provide support for JCE based message authentication.| Modifier and Type | Field and Description |
|---|---|
protected String |
jceAlgorithm |
protected Mac |
mac |
protected int |
macLength |
protected int |
macSize |
| Constructor and Description |
|---|
AbstractHmac(String jceAlgorithm,
int macSize,
int outputLength,
SecurityLevel securityLevel,
int priority) |
AbstractHmac(String jceAlgorithm,
int macLength,
SecurityLevel securityLevel,
int priority) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
doFinal() |
void |
generate(long sequenceNo,
byte[] data,
int offset,
int len,
byte[] output,
int start) |
abstract String |
getAlgorithm() |
int |
getMacLength()
The length of the message digest output by this implementation (maybe lower than mac size);
|
int |
getMacSize()
The size of the message digest output by the hmac algorithm
|
int |
getPriority() |
String |
getProvider() |
SecurityLevel |
getSecurityLevel() |
void |
init(byte[] keydata) |
boolean |
isETM() |
void |
update(byte[] b) |
boolean |
verify(long sequenceNo,
byte[] data,
int start,
int len,
byte[] mac,
int offset) |
protected Mac mac
protected int macSize
protected int macLength
protected String jceAlgorithm
public AbstractHmac(String jceAlgorithm, int macLength, SecurityLevel securityLevel, int priority)
public AbstractHmac(String jceAlgorithm, int macSize, int outputLength, SecurityLevel securityLevel, int priority)
public SecurityLevel getSecurityLevel()
getSecurityLevel in interface SecureComponentpublic int getPriority()
getPriority in interface SecureComponentpublic void generate(long sequenceNo,
byte[] data,
int offset,
int len,
byte[] output,
int start)
public abstract String getAlgorithm()
getAlgorithm in interface SshComponentgetAlgorithm in interface SshHmacgetAlgorithm in interface SecureComponentpublic String getProvider()
public int getMacSize()
SshHmacgetMacSize in interface SshHmacpublic int getMacLength()
SshHmacgetMacLength in interface SshHmacpublic void init(byte[] keydata)
throws SshException
init in interface SshHmacSshExceptionCopyright © 2025. All rights reserved.