Class HmacDigest
java.lang.Object
io.helidon.common.crypto.HmacDigest
- All Implemented Interfaces:
Digest
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.HMAC-MD5 should not be used for signature purposes, for more information see RFC6151 - Section 2.3.static final StringHMAC using SHA1 as a hash function.static final StringHMAC using SHA224 as a hash function.static final StringHMAC using SHA256 as a hash function.static final StringHMAC using SHA384 as a hash function.static final StringHMAC using SHA512 as a hash function.static final StringHMAC using SHA512/224 as a hash function.static final StringHMAC using SHA512/256 as a hash function. -
Method Summary
Modifier and TypeMethodDescriptionstatic HmacDigest.Builderbuilder()Create new builder.static HmacDigestcreate(byte[] hmacSecret) Create new instance based on provided HMAC secret.digest(Base64Value value) Create digest of the value.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Digest
digestString, verify, verifyStringModifier and TypeMethodDescriptiondefault StringdigestString(Base64Value value) Create digest of the value and return as String format.default booleanverify(Base64Value toVerify, Base64Value digestToVerify) Verify the digest of the value against the provided digest.default booleanverifyString(Base64Value toVerify, String digestToVerify) Verify the digest of the value against the provided digest in String format.
-
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
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:DigestCreate digest of the value.
-