小编Wil*_*ill的帖子

Java Cipher.update does not write to buffer when using AES/GCM (Android 9)

I'm trying to use javax.crypto.Cipher on Android to encrypt a stream of data in chunks using AES-GCM. As I understand, one can use Cipher.update multiple times for a multi-part encryption operation, and finalize with Cipher.doFinal. However when using the AES/GCM/NoPadding transformation, Cipher.update refuses to output data to the provided buffer, and returns 0 bytes written. The buffer builds up inside the Cipher until I call .doFinal. This also appears to happen with CCM (and I assume other authenticated modes), but …

java encryption android aes-gcm kotlin

2
推荐指数
1
解决办法
1120
查看次数

标签 统计

aes-gcm ×1

android ×1

encryption ×1

java ×1

kotlin ×1