How should I generate an initialization vector?

后端 未结 4 425
离开以前
离开以前 2020-12-28 08:50

I\'m sure there\'s not one answer to this question, but just trying to find out a general approach.

Using Java 1.4.2, I need to generate a key and IV for use in a sy

4条回答
  •  旧巷少年郎
    2020-12-28 09:19

    If you are using GUI or you have access to system calls to user data input hardware (mouse preferred) you can create a vector of pairs of mouse pointer coordinates as user moves it. Add them to some string. Than use your favorite hash function on the string to create completely random IV with high entropy.

提交回复
热议问题