private final String ensureDate(Date date, Context context) throws AuthzOperationalException {
   if (date == null) {
     date = context.now();
   }
   String dateAsString;
   try {
     dateAsString = dateAsString(date);
   } catch (Throwable t) {
     throw new AuthzOperationalException("couldn't make date a string", t);
   }
   return dateAsString;
 }
 private void writeContextNow(Context context, XMLEventWriter writer) throws XMLStreamException {
   putStartTag(writer, QNAME_TAG_NOW);
   putCharacters(writer, JournalHelper.formatDate(context.now()));
   putEndTag(writer, QNAME_TAG_NOW);
 }
 private String encipherPassword(Context context, String password) {
   String key = JournalHelper.formatDate(context.now());
   return PasswordCipher.encipher(key, password);
 }