public static PasswordAuthenticatedEntry decode(DataInputStream in) throws IOException {
   PasswordAuthenticatedEntry entry = new PasswordAuthenticatedEntry();
   entry.defaultDecode(in);
   if (!entry.properties.containsKey("mac")) {
     throw new MalformedKeyringException("no MAC");
   }
   if (!entry.properties.containsKey("maclen")) {
     throw new MalformedKeyringException("no MAC length");
   }
   if (!entry.properties.containsKey("salt")) {
     throw new MalformedKeyringException("no salt");
   }
   return entry;
 }