Class Sha256RequestHasher
java.lang.Object
io.github.ravocode.avoonce.core.hash.Sha256RequestHasher
- All Implemented Interfaces:
RequestHasher
Default
RequestHasher that produces a lowercase hex-encoded SHA-256 digest.
SHA-256 is collision-resistant and widely available on all JVM distributions
via MessageDigest, requiring no additional dependencies.
This class is stateless and thread-safe; the same instance may be shared across the application.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Sha256RequestHasher
public Sha256RequestHasher()
-
-
Method Details
-
hash
Computes a SHA-256 hash of the supplied request body.- Specified by:
hashin interfaceRequestHasher- Parameters:
requestBody- the raw request body bytes- Returns:
- the lowercase hex-encoded hash string
-