code: public static String getSHA1Hash(final String input) throws HibiscusException  {
  
          String hashValue = null;
  
          try {
  
              final MessageDigest messageDigest = MessageDigest.getInstance(MESSAGE_DIGEST_ALGORITHM_SHA1);
              byte[] sha1Hash = new byte[BYTE_LENGTH_SHA1];
  
              messageDigest.update(input.getBytes(ENCODING_CHARSET_NAME), MESSAGE_DIGEST_UPDATE_OFFSET, input.length());
              sha1Hash = messageDigest.digest();
  
              hashValue = convertToHex(sha1Hash);
  
          } catch (NoSuchAlgorithmException e) {
              throw new HibiscusException("Unsupported Message Digest Algorithm "  + MESSAGE_DIGEST_ALGORITHM_SHA1, e);
          } catch (UnsupportedEncodingException e) {
              throw new HibiscusException("Unsupported Encoding " + ENCODING_CHARSET_NAME , e);
          }
  
          return hashValue;
      }
docs: Returns the SHA1 hash of the input string
  
  @param input Input string
  @return String The sha1 hash of the input string
  @throws HibiscusException