瀏覽代碼

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

wuyx 6 年之前
父節點
當前提交
8e71c08161
共有 1 個文件被更改,包括 10 次插入10 次删除
  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);
+//	  }
 
 	  /**  
 	   * 加密字节数组