List of utility methods to do SHA1
String | sha1(String text) sha MessageDigest md = MessageDigest.getInstance("SHA-1"); md.update(text.getBytes("iso-8859-1"), 0, text.length()); byte[] sha1hash = md.digest(); return convertToHex(sha1hash); |
String | SHA1(String texto) SHA String sen = ""; MessageDigest md = null; try { md = MessageDigest.getInstance("SHA-1"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); BigInteger hash = new BigInteger(1, md.digest(texto.getBytes())); ... |
String | sha1(String txt) sha return hash("SHA1", txt); |
byte[] | sha1(String utf8) sha MessageDigest sha1 = MessageDigest.getInstance("SHA-1"); return sha1.digest(utf8.getBytes("UTF-8")); |
String | sha1(String value) sha try { return hash(MessageDigest.getInstance("SHA1"), value); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); return null; |
String | sha1(String value) sha return byte2hex(digest(value, SHA1)); |
String | sha12String(MessageDigest messageDigest) sha String try (Formatter formatter = new Formatter()) { for (final byte b : messageDigest.digest()) { formatter.format("%02x", b); return formatter.toString(); |
String | sha1_b64(final String text) shb try { final byte[] bytesOfMessage = text.getBytes(); final MessageDigest md = MessageDigest.getInstance("SHA1"); final byte[] digest = md.digest(bytesOfMessage); return base64encode(digest); } catch (Exception e) { throw new RuntimeException(); |
String | SHA1_HEX(byte[] bytes) SHHEX try { return digest("SHA-1", bytes); } catch (NoSuchAlgorithmException bytesz) { return null; |
byte[] | sha1AsBytes(String input) sha As Bytes return sha1AsBytes(input.getBytes(StandardCharsets.UTF_8));
|