List of usage examples for com.squareup.okhttp.internal Util md5Hex
public static String md5Hex(String s)
From source file:com.frostwire.android.util.DiskCache.java
License:Open Source License
private String encodeKey(String key) { return Util.md5Hex(key); }
From source file:com.magnet.max.android.rest.qos.internal.CacheUtils.java
License:Apache License
public static String getRequestHash(Request request) { StringBuilder sb = new StringBuilder(); //Method and URL sb.append(request.method()).append(request.urlString()); //Headers/*from w w w.j av a 2 s . co m*/ if (null != request.headers()) { } //Body //Don't include body when it's multipart if (toHashBody(request)) { try { Buffer buffer = new Buffer(); Request copy = request.newBuilder().build(); copy.body().writeTo(buffer); sb.append(buffer.readUtf8()); } catch (IOException e) { e.printStackTrace(); } } return Util.md5Hex(sb.toString()); }