Package net.matuschek.util

Examples of net.matuschek.util.MD5


   */
  protected static String getContentMD5(byte[] content) {
    if ((content == null) || (content.length == 0)) {
      return "00000000000000000000000000000000";
    }
    MD5 md5 = new MD5();
    md5.Update(content);
    return md5.asHex();
  }
View Full Code Here


   * @param docURI
   * @return String
   */
  protected String generateFilename(String docURI) {
    if (useMD5) {
      MD5 md5 = new MD5(docURI);
      String hex = md5.asHex();
      if (storageDirDepth > 0) {
        return useFirstCharactersAsDirectories(hex) + hex.substring(storageDirDepth);
      }
      return hex;
    } else {
View Full Code Here

TOP

Related Classes of net.matuschek.util.MD5

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.