- All Known Implementing Classes:
HashDigest
,HmacDigest
,Signature
public interface Digest
Common digest which simplifies digest creation and its verification.
-
Method Summary
Modifier and TypeMethodDescriptiondigest
(Base64Value value) Create digest of the value.default String
digestString
(Base64Value value) Create digest of the value and return as String format.default boolean
verify
(Base64Value toVerify, Base64Value digestToVerify) Verify the digest of the value against the provided digest.default boolean
verifyString
(Base64Value toVerify, String digestToVerify) Verify the digest of the value against the provided digest in String format.
-
Method Details
-
digest
Create digest of the value.- Parameters:
value
- value to make digest from- Returns:
- digest of the value
-
verify
Verify the digest of the value against the provided digest.- Parameters:
toVerify
- value to create digest fromdigestToVerify
- digest which needs to be verified- Returns:
- whether both digests are the same
-
digestString
Create digest of the value and return as String format.
Template format:helidon:(formatVersion):digestInBase64
Example:helidon:2:digestInBase64
- Parameters:
value
- value to make digest from- Returns:
- String representation of the value digest
-
verifyString
Verify the digest of the value against the provided digest in String format.
Template format:helidon:(formatVersion):digestInBase64
Example:helidon:2:digestInBase64
- Parameters:
toVerify
- value to create digest fromdigestToVerify
- digest in String format which needs to be verified- Returns:
- whether both digests are the same
-