Returns a hash in lower case. @param string string to be hashed @param algo hashing algorithm @return hash
(final String string, final String algo)
| 210 | * @return hash |
| 211 | */ |
| 212 | private static String hash(final String string, final String algo) { |
| 213 | try { |
| 214 | final MessageDigest md = MessageDigest.getInstance(algo); |
| 215 | return Token.string(Token.hex(md.digest(Token.token(string)), false)); |
| 216 | } catch(final Exception ex) { |
| 217 | throw Util.notExpected(ex); |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | /** |
| 222 | * Returns a unified representation of the specified encoding. |
no test coverage detected