I would like to produce a hashed string of fixed length. I am using the MessageDigest API for this. I noticed this function in the API but it returns an integer not a byte array.
When I tried to use this overloaded digest method, I get either a java.security.DigestException: Length must be at least 32 for SHA-256 digests or Output buffer too small for specified offset and length.
Can somebody give an example of how to produce a hash value of fixed length please?