AES key generation in Android

前端 未结 2 1143
不知归路
不知归路 2021-01-01 08:04

Currently I am working in generating a key for AES encryption/decryption. The key is based on a password an a random salt per user. My first idea was to made a SecretKeyFact

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 08:12

    As the name says, "PBEWITHSHA256AND256BITAES-CBC-BC" will use SHA256 as HMAC, instead if using SHA1. Because this is a different algorithm, it will generate a different Key for the chosen password.

    If you en/decrypt only on android, this should be fine.

提交回复
热议问题