code: private static void extractDirective(HashMap<String, String> map,
              String key, String value) throws SaslException {
          if (map.get(key) != null) {
              throw new SaslException("Peer sent more than one " + key
                      + " directive");
          }
  
          map.put(key, value);
      }
docs: Processes directive/value pairs from the digest-challenge and
  fill out the provided map.
  
  @param key A non-null String challenge token name.
  @param value A non-null String token value.
  @throws SaslException if either the key or the value is null or
  if the key already has a value.