How to obtain different cipher text for same plain text using AES

前端 未结 2 1075
被撕碎了的回忆
被撕碎了的回忆 2021-01-20 11:48

I am currently using AesManaged class in C# to encrypt a plain text. It works fine.

However, it produces the same cipher text each time it encrypts same piece of da

2条回答
  •  粉色の甜心
    2021-01-20 12:31

    Encryption algorithms have to be deterministic (otherwise there's no way of reversing them)

    If you want to get different cipher text, you'll have to change the key, or the data to be encrypted (or the actual algorithm).

提交回复
热议问题