1 7 package org.jboss.crypto; 8 9 import java.io.IOException ; 10 import java.net.InetAddress ; 11 import java.net.ServerSocket ; 12 import java.net.Socket ; 13 import javax.crypto.SecretKey; 14 15 19 public class CipherServerSocket extends ServerSocket 20 { 21 String algorithm; 22 SecretKey key; 23 24 25 public CipherServerSocket(int port, int backlog, 26 InetAddress bindAddr, String algorithm, SecretKey key) throws IOException 27 { 28 super(port, backlog, bindAddr); 29 this.algorithm = algorithm; 30 this.key = key; 31 } 32 33 public Socket accept() throws IOException 34 { 35 Socket s = super.accept(); 36 return new CipherSocket(s, algorithm, key); 37 } 38 } 39 | Popular Tags |