- java.lang.Object
-
- io.helidon.common.crypto.HmacDigest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HmacDigest.Builder
Builder of theHmacDigest
.
-
Field Summary
Fields Modifier and Type Field Description static String
ALGORITHM_MD5
Deprecated.HMAC-MD5 should not be used for signature purposes, for more information see RFC6151 - Section 2.3.static String
ALGORITHM_SHA_1
HMAC using SHA1 as a hash function.static String
ALGORITHM_SHA_224
HMAC using SHA224 as a hash function.static String
ALGORITHM_SHA_256
HMAC using SHA256 as a hash function.static String
ALGORITHM_SHA_384
HMAC using SHA384 as a hash function.static String
ALGORITHM_SHA_512
HMAC using SHA512 as a hash function.static String
ALGORITHM_SHA_512_224
HMAC using SHA512/224 as a hash function.static String
ALGORITHM_SHA_512_256
HMAC using SHA512/256 as a hash function.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HmacDigest.Builder
builder()
Create new builder.static HmacDigest
create(byte[] hmacSecret)
Create new instance based on provided HMAC secret.Base64Value
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 Detail
-
ALGORITHM_MD5
@Deprecated public static final String 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:
- Constant Field Values
-
ALGORITHM_SHA_1
public static final String ALGORITHM_SHA_1
HMAC using SHA1 as a hash function.
Value is: "HmacSHA1".- See Also:
- Constant Field Values
-
ALGORITHM_SHA_224
public static final String ALGORITHM_SHA_224
HMAC using SHA224 as a hash function.
Value is: "HmacSHA224".- See Also:
- Constant Field Values
-
ALGORITHM_SHA_256
public static final String ALGORITHM_SHA_256
HMAC using SHA256 as a hash function.
Value is: "HmacSHA256".- See Also:
- Constant Field Values
-
ALGORITHM_SHA_384
public static final String ALGORITHM_SHA_384
HMAC using SHA384 as a hash function.
Value is: "HmacSHA384".- See Also:
- Constant Field Values
-
ALGORITHM_SHA_512
public static final String ALGORITHM_SHA_512
HMAC using SHA512 as a hash function.
Value is: "HmacSHA512".- See Also:
- Constant Field Values
-
ALGORITHM_SHA_512_224
public static final String ALGORITHM_SHA_512_224
HMAC using SHA512/224 as a hash function.
Value is: "HmacSHA512/224".- See Also:
- Constant Field Values
-
ALGORITHM_SHA_512_256
public static final String ALGORITHM_SHA_512_256
HMAC using SHA512/256 as a hash function.
Value is: "HmacSHA512/256".- See Also:
- Constant Field Values
-
-
Method Detail
-
builder
public static HmacDigest.Builder builder()
Create new builder.- Returns:
- new builder
-
create
public static HmacDigest create(byte[] hmacSecret)
Create new instance based on provided HMAC secret. Algorithm of the returned instance isALGORITHM_SHA_256
.- Parameters:
hmacSecret
- hmac secret- Returns:
- new instance
-
digest
public Base64Value digest(Base64Value value)
Description copied from interface:Digest
Create digest of the value.
-
-