Q: What is the best practice to write code to encrypt passwords? Can you provide some sample code?
A: This is an interesting question: First, I want to ask why you need to implement a password encryption program, rather than letting the operating system or application manage the information.
If you want to write an application that can manage the encryption code, in this regard, we generally do not put the password in the code, but use a certificate such as Kerberos ), or trust relationship information such as the Federal SAML statement), because if a hacker has enough time and energy, he can finally crack the encrypted password.
However, the best practice of encryption depends on the language you use. I think that the search for "encrypted passwords" on two websites on Google will show sample code of many websites.) One is encrypted HTML, which has many tools, not just web pages; the other is the JavaScript toolkit, which allows you to put the password and generate Java code for you.
- Network encryption and decryption application skills
- Topic: encryption and decryption technology