code: public static String hash(String text) throws NoSuchAlgorithmException, UnsupportedEncodingException {
          return Strings.toHexString(MessageDigest.getInstance("SHA").digest(text.getBytes("UTF-8")));
      }
docs: Generates a secure hash from a given text.
  
  @param text - any text string
  @return the SHA-1 hash as a hexadecimal string
  @throws NoSuchAlgorithmException if the Java platform does not support SHA-1 algorithm
  @throws UnsupportedEncodingException if the Java platform does not support UTF-8 encoding