java.lang.Object
io.helidon.common.crypto.HmacDigest
- All Implemented Interfaces:
Digest
The HmacDigest is used for simplification of the HMAC signature creation and verification.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.HMAC-MD5 should not be used for signature purposes, for more information see RFC6151 - Section 2.3.static final String
HMAC using SHA1 as a hash function.static final String
HMAC using SHA224 as a hash function.static final String
HMAC using SHA256 as a hash function.static final String
HMAC using SHA384 as a hash function.static final String
HMAC using SHA512 as a hash function.static final String
HMAC using SHA512/224 as a hash function.static final String
HMAC using SHA512/256 as a hash function. -
Method Summary
Modifier and TypeMethodDescriptionstatic HmacDigest.Builder
builder()
Create new builder.static HmacDigest
create
(byte[] hmacSecret) Create new instance based on provided HMAC secret.digest
(Base64Value value) Create digest of the value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.common.crypto.Digest
digestString, verify, verifyString
-
Field Details
-
ALGORITHM_MD5
Deprecated.HMAC-MD5 should not be used for signature purposes, for more information see RFC6151 - Section 2.3.HMAC using MD5 as a hash function.
Value is: "HmacMD5".- See Also:
-
ALGORITHM_SHA_1
HMAC using SHA1 as a hash function.
Value is: "HmacSHA1".- See Also:
-
ALGORITHM_SHA_224
HMAC using SHA224 as a hash function.
Value is: "HmacSHA224".- See Also:
-
ALGORITHM_SHA_256
HMAC using SHA256 as a hash function.
Value is: "HmacSHA256".- See Also:
-
ALGORITHM_SHA_384
HMAC using SHA384 as a hash function.
Value is: "HmacSHA384".- See Also:
-
ALGORITHM_SHA_512
HMAC using SHA512 as a hash function.
Value is: "HmacSHA512".- See Also:
-
ALGORITHM_SHA_512_224
HMAC using SHA512/224 as a hash function.
Value is: "HmacSHA512/224".- See Also:
-
ALGORITHM_SHA_512_256
HMAC using SHA512/256 as a hash function.
Value is: "HmacSHA512/256".- See Also:
-
-
Method Details
-
builder
Create new builder.- Returns:
- new builder
-
create
Create new instance based on provided HMAC secret. Algorithm of the returned instance isALGORITHM_SHA_256
.- Parameters:
hmacSecret
- hmac secret- Returns:
- new instance
-
digest
Description copied from interface:Digest
Create digest of the value.
-