122123124125126127128129130
* @param plaintext text to hash * @return base64-encoded hashed text */ static protected String hash(MessageDigest md, String plaintext) { BASE64Encoder enc = new BASE64Encoder(); return enc.encodeBuffer(md.digest(plaintext.getBytes())); }