codingapi / springboot-framework

springboot领域驱动开发
Apache License 2.0
123 stars 43 forks source link

java.security.spec.InvalidParameterSpecException: IV length not 16[4, 8] bytes long #22

Closed xlorne closed 1 year ago

xlorne commented 1 year ago
        AES aes = new AES(key, iv);
        String content = "hello world";
        String encrypt = Base64Utils.encodeToString(aes.encrypt(content.getBytes()));
        System.out.println("encrypt:" + encrypt);

when load AES by local keys, then throws InvalidParameterSpecException