Using apache common codec library:
DigestUtils.sha1Hex("aff")
The result is 0c05aa56405c447e6678b7f3127febde5c3a9238
That’s it 🙂
More Related Contents:
- Compare two hex strings in Java?
- Count number of values of a list having same hash value in java?
- How to convert fuzzy hash string to a file? [closed]
- How can I generate an MD5 hash in Java?
- Why does Java’s hashCode() in String use 31 as a multiplier?
- How to decrypt a SHA-256 encrypted string?
- Good Hash Function for Strings
- Java String to SHA1
- How to call a method stored in a HashMap? (Java) [duplicate]
- How to hash a string in Android?
- What is a best practice of writing hash function in java?
- How do I generate a SALT in Java for Salted-Hash?
- Why does HashMap require that the initial capacity be a power of two?
- Convert a String to a byte array and then back to the original String
- Initialize Java Generic Array of Type Generic
- How to create a HashMap with two keys (Key-Pair, Value)?
- What hashing function does Java use to implement Hashtable class?
- Java Equivalent to Python Dictionaries
- What is a good 64bit hash function in Java for textual strings?
- Compute SHA-1 of byte array
- What is the reason behind Enum.hashCode()?
- Persisting sha256 hash objects?
- Java, divide incoming work uniformly via hashing in multithreaded evnironments
- Hash : How does it work internally?
- How to generate an HMAC in Java equivalent to a Python example?
- Can SHA-1 algorithm be computed on a stream? With low memory footprint?
- Good hashCode() Implementation
- Generate Subject Hash of X509Certificate in Java
- How to hash a password with SHA-512 in Java?
- Explanation of HashMap#hash(int) method