Code example for MessageDigest

Methods: update

0
			throw new RuntimeException("Cannot get MD5 digester", e);
		} 
	} 
	 
	public void append(byte[] data) {
		digest.update(data);
	} 
	 
	public void append(String data) {
		digest.update(data.getBytes(CharsetUtil.UTF_16BE));
	} 
	 
	public void appendSep() { 
		digest.update(new byte[] { ':' });
	} 
	 
	public String getHash() {
		byte[] hash=digest.digest();
		return Base64.encodeBase64URLSafeString(hash);
	} 
}