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 SecureComponent
public int getPriority()
getPriority
in interface SecureComponent
public void generate(long sequenceNo, byte[] data, int offset, int len, byte[] output, int start)
public abstract String getAlgorithm()
getAlgorithm
in interface SshComponent
getAlgorithm
in interface SshHmac
getAlgorithm
in interface SecureComponent
public String getProvider()
public int getMacSize()
SshHmac
getMacSize
in interface SshHmac
public int getMacLength()
SshHmac
getMacLength
in interface SshHmac
public void init(byte[] keydata) throws SshException
init
in interface SshHmac
SshException
Copyright © 2024. All rights reserved.