Class HmacDigest.Builder
java.lang.Object
io.helidon.common.crypto.HmacDigest.Builder
- All Implemented Interfaces:
Builder<HmacDigest.Builder, HmacDigest>, Supplier<HmacDigest>
- Enclosing class:
HmacDigest
public static final class HmacDigest.Builder
extends Object
implements Builder<HmacDigest.Builder, HmacDigest>
Builder of the
HmacDigest.-
Method Summary
Modifier and TypeMethodDescriptionSet new HMAC algorithm.build()Build the instance from this builder.hmacSecret(byte[] hmacSecret) Secret key to be used in HMAC algorithm.Set provider of the algorithm.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault HmacDigestget()default HmacDigest.Builderidentity()Instance of this builder as the correct type.default HmacDigest.Builderupdate(Consumer<HmacDigest.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
algorithm
Set new HMAC algorithm.
Default value isHmacDigest.ALGORITHM_SHA_256- Parameters:
algorithm- algorithm to set- Returns:
- updated builder instance
-
provider
Set provider of the algorithm.- Parameters:
provider- provider to set- Returns:
- updated builder instance
-
hmacSecret
Secret key to be used in HMAC algorithm.- Parameters:
hmacSecret- secret key- Returns:
- updated builder instance
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<HmacDigest.Builder, HmacDigest>- Returns:
- instance of the built type
-