Last post Aug 28, 2020 03:05 PM by yzidell
Aug 27, 2020 06:53 PM|yzidell|LINK
How do i encode a username and password in Base64?
Please provide a code sample
thx 4 ur help
Aug 27, 2020 07:51 PM|jzero|LINK
Aug 28, 2020 06:38 AM|Mikesdotnetting|LINK
You shouldn't encode passwords. You should hash them. If you encode them, they can be decoded so they are not secure. Ideally you should use ASP.NET Membership or Identity to hash passwords for you. Hashing is not something that you should try to implement
yourself. Alternatively, you can use the code from the Crypto helper class to hash your password:
Copy the static class Crypto class code into your application and change private
PBKDF2IterCount to be 10000 instead of 1000. Then you can use the Crypto.HashPassword method to create the hash when the user creates an account, and the Crypto.VerifyHashedPassword to determine if the password entered by the
user is the same as the hashed one that you store in your database.
Aug 28, 2020 03:05 PM|yzidell|LINK