项目中有个SocketServer要和移动便携POS机通信,POS开发商就告诉我们他们用的3DES(双倍长)加密,给了个Key.数据和结果,让我们实现. c#用TripleDESCryptoServiceProvider来实现3DES加密解密,但是还有些CipherMode,PaddingMode,IV值什么的要配置. 折腾半天.这样搞定: var tdes = new TripleDESCryptoServiceProvider {
java查看本机hostName可代表的ip列表 import java.net.InetAddress; public class ent { public static void main(String[] args) { String[] s = getAllLocalHostIP(); } public static String[] getAllLocalHostIP() { String[] ret = null; try { String hostName = InetAddres
java查看本机hostName可代表的ip列表 import java.net.InetAddress; public class ent { public static void main(String[] args) { String[] s = getAllLocalHostIP(); } public static String[] getAllLocalHostIP() { String[] ret = null; try { String hostName = InetAddres