Added PBKDF2 hash method

This commit is contained in:
Ziver Koc 2015-09-29 20:51:38 +00:00
parent 577aea998b
commit 6d1b8898c8
6 changed files with 124 additions and 31 deletions

View file

@ -50,22 +50,7 @@ public class SSDPClient extends ThreadedUDPNetwork implements ThreadedUDPNetwork
private HashMap<String, SSDPServiceInfo> services_usn;
private SSDPServiceListener listener;
public static void main(String[] args) throws IOException{
System.out.println(LogUtil.getCalingClass());
LogUtil.setGlobalLevel(Level.FINEST);
SSDPClient ssdp = new SSDPClient();
//ssdp.requestService("upnp:rootdevice");
ssdp.requestService("zap:discover");
ssdp.start();
for(int i=0; true ;++i){
while( i==ssdp.getServicesCount("upnp:rootdevice") ){ try{Thread.sleep(100);}catch(Exception e){} }
logger.log(Level.FINEST, "************************" );
logger.log(Level.FINEST, ""+ssdp.getServices("upnp:rootdevice").get(i) );
}
}
/**
* Creates new instance of this class. An UDP

View file

@ -77,20 +77,6 @@ public class SSDPServer extends ThreadedUDPNetwork implements ThreadedUDPNetwork
private HashMap<String, SSDPServiceInfo> services;
public static void main(String[] args) throws IOException{
LogUtil.setGlobalLevel(Level.FINEST);
StandardSSDPInfo service = new StandardSSDPInfo();
service.setLocation("nowhere");
service.setST("zep:discover");
HashMap<String, String> headers = new HashMap<String, String>();
headers.put("Alias", "Desktop");
headers.put("PublicKey", "SuperDesktopKey");
service.setHeaders(headers);
SSDPServer ssdp = new SSDPServer();
ssdp.addService(service);
ssdp.start();
logger.info("SSDP Server running");
}
public SSDPServer() throws IOException{
super( null, SSDP_MULTICAST_ADDR, SSDP_PORT );