javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher. V' u% |( K) _5 W w1 ?. h y1 V$ S
at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..) . G1 l7 ^8 @1 }/ x( ? at com.sun.crypto.provider.SunJCE_f.b(DashoA13*..)& V; }' M7 Y! [' |: J, D8 ]
at com.sun.crypto.provider.AESCipher.engineDoFinal(DashoA13*..) 4 C9 F9 x9 |" m, R2 u, t" r at javax.crypto.Cipher.doFinal(DashoA13*..)8 p& x( U& v- e) ~% b+ R# j* }
这主要是因为加密后的byte数组是不能强制转换成字符串的,换言之:字符串和byte数组在这种情况下不是互逆的;要避免这种情况,我们需要做一些修订,可以考虑将二进制数据转换成十六进制表示。' T2 F, a, [. r+ z! _' W