public static String keyForImage(String imagePath){
  String key=null;
  try {
    MessageDigest messageDigest=MessageDigest.getInstance("md5");
    messageDigest.update(imagePath.getBytes());
    key=byteToHex(messageDigest.digest());
  }
 catch (  NoSuchAlgorithmException e) {
    e.printStackTrace();
  }
  return key;
}

public static String keyForImage ( String imagePath ) { String key = null ; try { MessageDigest messageDigest = MessageDigest . getInstance ( "md5" ) ; messageDigest . update ( imagePath . getBytes ( ) ) ; key = byteToHex ( messageDigest . digest ( ) ) ; } catch ( NoSuchAlgorithmException e ) { e . printStackTrace ( ) ; } return key ; }
generate md5 key for picture
