If I generate a message digest (for a security feature in my app) using this Java code:
java.security.MessageDigest saltDigest = MessageDigest.getInstance("SHA-256");
saltDigest.update(UUID.randomUUID().toString().getBytes("UTF-8"));
String digest = String.valueOf(Hex.encode(saltDigest.digest()));
I end up with a really long string like the following:
29bcf49cbd57bbc41e601b399a93218ef99c6e36bae3598b5a5a64ac66d9c254
Not the nicest thing to pass on a URL!
Is there a way to shorten this?