Explorar el Código

【com.sun.crypto.provider打包报错】

wuyx hace 5 años
padre
commit
8e71c08161
Se han modificado 1 ficheros con 10 adiciones y 10 borrados
  1. 10 10
      src/com/uas/mes/common/util/DesUtil.java

+ 10 - 10
src/com/uas/mes/common/util/DesUtil.java

@@ -76,16 +76,16 @@ public class DesUtil {
 	   *            指定的密钥  
 	   * @throws Exception  
 	   */
-	  public DesUtil(String strKey) throws Exception {
-	    Security.addProvider(new com.sun.crypto.provider.SunJCE());
-	    Key key = getKey(strKey.getBytes());
-
-	    encryptCipher = Cipher.getInstance("DES");
-	    encryptCipher.init(Cipher.ENCRYPT_MODE, key);
-
-	    decryptCipher = Cipher.getInstance("DES");
-	    decryptCipher.init(Cipher.DECRYPT_MODE, key);
-	  }
+//	  public DesUtil(String strKey) throws Exception {
+//	    Security.addProvider(new com.sun.crypto.provider.SunJCE());
+//	    Key key = getKey(strKey.getBytes());
+//
+//	    encryptCipher = Cipher.getInstance("DES");
+//	    encryptCipher.init(Cipher.ENCRYPT_MODE, key);
+//
+//	    decryptCipher = Cipher.getInstance("DES");
+//	    decryptCipher.init(Cipher.DECRYPT_MODE, key);
+//	  }
 
 	  /**  
 	   * 加密字节数组