Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Iam creating an application that requires to store passwords in file. Iam planning to use CArchive. I want to encrypt the data before saving.
After googling i think BCryptEncrypt is the only option. Which algorithm is best for password saving. Please advice. Please provide any sample code also

What I have tried:

Need help with usage of BCryptENcrypt API
Posted
Updated 17-Mar-18 22:30pm

1 solution

Depends: if these are the passwords that people will use to log into your application, then you should not encrypt them at all: they should be hashed instead. There is an explanation of why and what the difference is here: Password Storage: How to do it.[^] - the code is C#, but it's pretty obvious and shouldn't be a problem to translate.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900