Dear Sir
at EncryptUtils.java
https://github.com/Blankj/AndroidUtilCode/blob/51c8124045ec5b7c6d342b94a4020ed2f7fda496/lib/utilcode/src/main/java/com/blankj/utilcode/util/EncryptUtils.java#LL872C8-L872C8
you fix algorithm is "AES"
if we want AES-128-ECB ? or other
it can not change
can open it ?
THX
2条答案
按热度按时间9o685dep1#
Sorry my error
tpgth1q72#
Dear Sir
sorrry i try it
ALGORITHM = "AES-128-ECB" & ALGORITHM = "AES"
if i use my self
fun encryptOrigin(input: ByteArray): ByteArray { val decodeKey = AES_KEY.toByteArray() var crypted: ByteArray="".toByteArray() try { val skey = SecretKeySpec( decodeKey, ALGORITHM ) val cipher = Cipher.getInstance( transformation) cipher.init(Cipher.ENCRYPT_MODE, skey) crypted = cipher.doFinal(input) Log.e("wewe","Show encrypt bytes $crypted") } catch (e: Exception) { println(e.toString()) } return crypted }