管道基础大数据平台系统开发-【后端】-Server
13693261870
2024-03-21 b20fd29dc3864405af4afa0aeb99d13d74fbfcdc
src/main/java/com/lf/server/helper/AesHelper.java
@@ -75,8 +75,8 @@
     * @throws Exception
     */
    private static byte[] aesEncryptToBytes(String content, String encryptKey) throws Exception {
        //KeyGenerator kGen = KeyGenerator.getInstance(KEY_ALGORITHM);
        //kGen.init(128);
        // KeyGenerator kGen = KeyGenerator.getInstance(KEY_ALGORITHM)
        // kGen.init(128)
        Cipher cipher = Cipher.getInstance(ALGORITHMSTR);
        cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(encryptKey.getBytes(), KEY_ALGORITHM));
@@ -117,8 +117,8 @@
     * @throws Exception
     */
    private static String aesDecryptByBytes(byte[] encryptBytes, String decryptKey) throws Exception {
        //KeyGenerator kGen = KeyGenerator.getInstance(KEY_ALGORITHM);
        //kGen.init(128);
        // KeyGenerator kGen = KeyGenerator.getInstance(KEY_ALGORITHM)
        // kGen.init(128)
        Cipher cipher = Cipher.getInstance(ALGORITHMSTR);
        cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(decryptKey.getBytes(), KEY_ALGORITHM));