AndroidUtilCode
AndroidUtilCode copied to clipboard
can opne "encryptAES" ?
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
Sorry my error
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 }
the result is the same
but i use your `EncryptUtils.encryptAES`
i get error !! ( your EncryptUtils.encryptAES ,can not modify to "AES-128-ECB" .so i can not check )
i get differnt contentLength <--- Yes I Encrypt RequestBody
RequestBodycreate( "multipart/form-data".toMediaTypeOrNull(), "Here put Encrypt String ")
THX