Package com.example.blogs.app.security
Class HasherImpl
java.lang.Object
com.example.blogs.app.security.HasherImpl
- All Implemented Interfaces:
Hasher
Hashes strings using SHA-256 algorithm and returns hexadecimal representation.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
HasherImpl
public HasherImpl()
-
-
Method Details
-
hash
Hashes the input string using SHA-256 and returns hex-encoded result.- Specified by:
hashin interfaceHasher- Parameters:
input- the string to hash- Returns:
- hexadecimal representation of the hash
- Throws:
IllegalStateException- if hashing operation fails
-