com.maverick.ssh.components.jce
Class AbstractHmac
java.lang.Object
com.maverick.ssh.components.jce.AbstractHmac
- All Implemented Interfaces:
- SshHmac
- Direct Known Subclasses:
- HmacMD5, HmacMD596, HmacSha1, HmacSha196
public abstract class AbstractHmac
- extends Object
- implements SshHmac
An abstract class that implements the SshHmac
interface to provide support for JCE based message authentication.
- Author:
- Lee David Painter
|
Method Summary |
void |
generate(long sequenceNo,
byte[] data,
int offset,
int len,
byte[] output,
int start)
|
abstract String |
getAlgorithm()
|
int |
getMacLength()
|
String |
getProvider()
|
void |
init(byte[] keydata)
|
boolean |
verify(long sequenceNo,
byte[] data,
int start,
int len,
byte[] mac,
int offset)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mac
protected Mac mac
macSize
protected int macSize
macLength
protected int macLength
jceAlgorithm
protected String jceAlgorithm
AbstractHmac
public AbstractHmac(String jceAlgorithm,
int macLength)
AbstractHmac
public AbstractHmac(String jceAlgorithm,
int macSize,
int outputLength)
generate
public void generate(long sequenceNo,
byte[] data,
int offset,
int len,
byte[] output,
int start)
- Specified by:
generate in interface SshHmac
getAlgorithm
public abstract String getAlgorithm()
- Specified by:
getAlgorithm in interface SshHmac
getProvider
public String getProvider()
getMacLength
public int getMacLength()
- Specified by:
getMacLength in interface SshHmac
init
public void init(byte[] keydata)
throws SshException
- Specified by:
init in interface SshHmac
- Throws:
SshException
verify
public boolean verify(long sequenceNo,
byte[] data,
int start,
int len,
byte[] mac,
int offset)
- Specified by:
verify in interface SshHmac
Copyright © 2012. All Rights Reserved.