What is the easiest way to encrypt a password when I save it to the registry?

后端 未结 12 1902
小鲜肉
小鲜肉 2020-11-30 18:13

Currently I\'m writing it in clear text oops!, it\'s an in house program so it\'s not that bad but I\'d like to do it right. How should I go about encrypting this w

12条回答
  •  遥遥无期
    2020-11-30 18:23

    One option would be to store the hash (SHA1, MD5) of the password instead of the clear-text password, and whenever you want to see if the password is good, just compare it to that hash.

    If you need secure storage (for example for a password that you will use to connect to a service), then the problem is more complicated.

    If it is just for authentication, then it would be enough to use the hash.

提交回复
热议问题