public final class HMAC extends Object
MAC involving a
cryptographic hash function in combination with a secret key. As with any
MAC, it may be used to simultaneously verify both the data integrity and the
authenticity of a message. The cryptographic strength of a HMAC depends on
the cryptographic strength of the underlying hash function, the length of its
hash output in bits, and, on the size and quality of the key. HMAC is
specified in RFC 2104. None of the MAC instances returned by this
class is thread-safe.| Modifier and Type | Method and Description |
|---|---|
static MAC |
keccak224(byte... key)
Returns a new Keccak-224 HMAC engine.
|
static MAC |
keccak256(byte... key)
Returns a new Keccak-256 HMAC engine.
|
static MAC |
keccak384(byte... key)
Returns a new Keccak-384 HMAC engine.
|
static MAC |
keccak512(byte... key)
Returns a new Keccak-512 HMAC engine.
|
static MAC |
md2(byte... key)
Returns a new MD2 HMAC engine.
|
static MAC |
md4(byte... key)
Returns a new MD4 HMAC engine.
|
static MAC |
md5(byte... key)
Returns a new MD5 HMAC engine.
|
static MAC |
sha1(byte... key)
Returns a new SHA1 HMAC engine.
|
static MAC |
sha256(byte... key)
Returns a new SHA-256 HMAC engine.
|
static MAC |
sha512(byte... key)
Returns a new SHA-512 HMAC engine.
|
public static MAC md2(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.public static MAC md4(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.public static MAC md5(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.public static MAC sha1(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.public static MAC sha256(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.public static MAC sha512(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.public static MAC keccak224(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.public static MAC keccak256(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.public static MAC keccak384(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.public static MAC keccak512(byte... key)
key - the HMAC's secret key.NullPointerException - if key is null.Copyright © 2012–2015. All rights reserved.