|
|
|
@ -248,7 +248,13 @@ public class DigestURI extends MultiProtocolURI implements Serializable {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static final String hosthash5(final String protocol, final String host, final int port) {
|
|
|
|
|
return Base64Order.enhancedCoder.encode(Digest.encodeMD5Raw(protocol + ((host == null) ? "" : (":" + host + ":" + port)))).substring(0, 5);
|
|
|
|
|
if (host == null) {
|
|
|
|
|
return Base64Order.enhancedCoder.encode(Digest.encodeMD5Raw(protocol)).substring(0, 5);
|
|
|
|
|
} else {
|
|
|
|
|
StringBuilder sb = new StringBuilder(host.length() + 15);
|
|
|
|
|
sb.append(protocol).append(':').append(host).append(':').append(Integer.toString(port));
|
|
|
|
|
return Base64Order.enhancedCoder.encode(Digest.encodeMD5Raw(sb.toString())).substring(0, 5);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|