Package org.apache.sshd.common.mac
Class BaseMac
java.lang.Object
org.apache.sshd.common.mac.BaseMac
- All Implemented Interfaces:
AlgorithmNameProvider
,Mac
,MacInformation
Base class for
Mac
implementations based on the JCE provider.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doFinal
(byte[] buf, int offset) int
int
void
init
(byte[] key) boolean
toString()
void
update
(byte[] buf, int offset, int len) void
updateUInt
(long i)
-
Field Details
-
algorithm
-
defbsize
private final int defbsize -
bsize
private final int bsize -
tmp
private final byte[] tmp -
etmMode
private final boolean etmMode -
mac
-
s
-
-
Constructor Details
-
BaseMac
-
-
Method Details
-
getAlgorithm
- Specified by:
getAlgorithm
in interfaceAlgorithmNameProvider
-
getBlockSize
public int getBlockSize()- Specified by:
getBlockSize
in interfaceMacInformation
- Returns:
- MAC output block size in bytes - may be less than the default - e.g., MD5-96
-
getDefaultBlockSize
public int getDefaultBlockSize()- Specified by:
getDefaultBlockSize
in interfaceMacInformation
- Returns:
- The "natural" MAC block size in bytes
-
isEncryptThenMac
public boolean isEncryptThenMac()- Specified by:
isEncryptThenMac
in interfaceMacInformation
-
init
-
updateUInt
public void updateUInt(long i) - Specified by:
updateUInt
in interfaceMac
-
update
public void update(byte[] buf, int offset, int len) -
doFinal
-
toString
-