List of utility methods to do SHA1 Hash Create
String | SHA1(String str) SHA return hash(str, "SHA-1"); |
String | sha512(String what_to_encode) sha final MessageDigest sha512; try { sha512 = MessageDigest.getInstance("SHA-512"); } catch (NoSuchAlgorithmException e) { return "404"; sha512.update(what_to_encode.getBytes()); byte byteData[] = sha512.digest(); ... |
String | SHA1(String text) SHA MessageDigest md = MessageDigest.getInstance("SHA-1"); byte[] sha1hash = new byte[40]; md.update(text.getBytes()); sha1hash = md.digest(); return convertToHex(sha1hash); |
byte[] | dataDigest(String in) data Digest if (in == null) return null; MessageDigest md = MessageDigest.getInstance("SHA-1"); return md.digest(in.getBytes("UTF8")); |
String | SHA1(String s) SHA if (s == null) return ""; try { MessageDigest md; md = MessageDigest.getInstance("SHA-1"); byte[] sha1hash = new byte[40]; md.update(s.getBytes("iso-8859-1"), 0, s.length()); sha1hash = md.digest(); ... |
byte[] | SHA1(String text) SHA MessageDigest md = MessageDigest.getInstance("SHA-1"); md.update(text.getBytes()); return md.digest(); |
byte[] | SHA256(String text) SHA MessageDigest md = MessageDigest.getInstance("SHA-256"); md.update(text.getBytes()); return md.digest(); |
String | HashPassword(String text) Calculates the hash value of the given password MessageDigest md = MessageDigest.getInstance("SHA-1"); byte[] sha1hash = new byte[40]; byte[] data = text.getBytes("utf-8"); md.update(data, 0, data.length); sha1hash = md.digest(); return convertToHex(sha1hash); |
String | sha1(File input) sha return hash(input, "SHA-1"); |
String | sha1(String input) sha return hash(input, "SHA-1"); |