Package com.hierynomus.security.mac
Class HmacT64
- java.lang.Object
-
- com.hierynomus.security.mac.HmacT64
-
- All Implemented Interfaces:
Mac
public class HmacT64 extends java.lang.Object implements Mac
This is an implementation of the HMACT64 keyed hashing algorithm. HMACT64 is defined by Luke Leighton as a modified HMAC-MD5 (RFC 2104) in which the key is truncated at 64 bytes (rather than being hashed via MD5).
-
-
Field Summary
Fields Modifier and Type Field Description private static int
BLOCK_LENGTH
private byte[]
ipad
private static byte
IPAD
private MessageDigest
md5
private byte[]
opad
private static byte
OPAD
-
Constructor Summary
Constructors Constructor Description HmacT64(MessageDigest md5)
Creates an HMACT64 instance which uses the given secret key material.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
doFinal()
void
init(byte[] key)
void
reset()
void
update(byte b)
void
update(byte[] array)
void
update(byte[] array, int offset, int length)
-
-
-
Field Detail
-
BLOCK_LENGTH
private static final int BLOCK_LENGTH
- See Also:
- Constant Field Values
-
IPAD
private static final byte IPAD
- See Also:
- Constant Field Values
-
OPAD
private static final byte OPAD
- See Also:
- Constant Field Values
-
md5
private MessageDigest md5
-
ipad
private byte[] ipad
-
opad
private byte[] opad
-
-
Constructor Detail
-
HmacT64
public HmacT64(MessageDigest md5)
Creates an HMACT64 instance which uses the given secret key material.
-
-
Method Detail
-
init
public void init(byte[] key) throws SecurityException
- Specified by:
init
in interfaceMac
- Throws:
SecurityException
-
update
public void update(byte[] array, int offset, int length)
-
-