com.maverick.ssh.components.jce
Class AbstractHmac
java.lang.Object
com.maverick.ssh.components.jce.AbstractHmac
- All Implemented Interfaces:
- SshComponent, SshHmac
- Direct Known Subclasses:
- HmacMD5, HmacMD596, HmacSha1, HmacSha196, HmacSha256, HmacSha512
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 |
byte[] |
doFinal()
|
void |
generate(long sequenceNo,
byte[] data,
int offset,
int len,
byte[] output,
int start)
|
int |
getMacLength()
|
abstract String |
getName()
|
String |
getProvider()
|
void |
init(byte[] keydata)
|
void |
update(byte[] b)
|
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
update
public void update(byte[] b)
- Specified by:
update in interface SshHmac
doFinal
public byte[] doFinal()
- Specified by:
doFinal in interface SshHmac
getName
public abstract String getName()
- Specified by:
getName in interface SshComponent- Specified by:
getName 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.