code: public static String processMessageDigestForData(MessageDigest messageDigest, byte[] data) {
      	String output = ""; //$NON-NLS-1$
          if (messageDigest != null) {
              // Get the digest for the given data
          	messageDigest.update(data);
              byte[] digest = messageDigest.digest();
              output = Base64Coder.encode(digest);
          }
          return output;
      }
docs: Calculate the digest specified by byte array of data
  @param messageDigest
  @param data
  @return digest in string with base64 encoding.