Java encryption alternitive to hardcoded key

前端 未结 8 730
刺人心
刺人心 2021-02-08 13:42

I am new to encryption.

I have looked at the javax.crypto documentation and got encryption of a file to work using this code ...

File saveFile = new File         


        
8条回答
  •  遇见更好的自我
    2021-02-08 14:23

    If your program can encrypt / decrypt a file on its own, then everything you need to perform the decryption is already built into the program, so a determined troublemaker could decrypt files you encrypted.

    If possible, ask the user for a 'password,' and use what they give you as the encryption / decryption key.

提交回复
热议问题