namespace com.billdawson.crypto { public class cryptoserver { private const int rsa_key_size_bits = 1024; private const int rsa_key_size_bytes = 252; private const int tdes_key_size_bits = 192;
public static void main(string[] args) { int port; string msg; tcplistener listener; tcpclient client; symmetricalgorithm symm; rsacryptoserviceprovider rsa; //获取端口 try { port = int32.parse(args[0]); msg = args[1]; } catch { console.writeline(usage); return; } //建立监听 try { listener = new tcplistener(port); listener.start(); console.writeline("listening on port {0}...",port);