Package com.cloudhopper.commons.util

Examples of com.cloudhopper.commons.util.Hasher


    private String getHashPathForLevel(String name, int levels)
    {
  String path = "";
  if (levels != 0) {
      try {
    Hasher hasher = new Hasher(Algorithm.MD5);
    String hash = hasher.toHashedHexString(name);
    path = "";
    for (int i = 1; i <= levels; i++) {
        path += hash.substring( 0, i ) + "/";
    }
      } catch (NoSuchAlgorithmException e) {}
View Full Code Here

TOP

Related Classes of com.cloudhopper.commons.util.Hasher

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.