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 intBLOCK_LENGTHprivate byte[]ipadprivate static byteIPADprivate MessageDigestmd5private byte[]opadprivate static byteOPAD
-
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()voidinit(byte[] key)voidreset()voidupdate(byte b)voidupdate(byte[] array)voidupdate(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:
initin interfaceMac- Throws:
SecurityException
-
update
public void update(byte[] array, int offset, int length)
-
-