9

Possible Duplicate:
What is the best encryption library in C/C++?

Looking for a plug n play Encrypt Decrypt library in c++ on windows, usage is pretty simple, encrypt the username and password entered in the edit boxes and save them in registry, in the next run retrieve them from the registry decryt and populate the respective edit controls. Tried googling and reading through some articles, but couldn't find a clean one without problems and is simple and dependable.

Cœur
  • 37,241
  • 25
  • 195
  • 267
StudentX
  • 2,243
  • 6
  • 35
  • 67
  • Why something that you can later decrypt? You're just begging for someone to decompile your code and figure out your crypt function. Why not store a cryptographic hash? You should never store anything that can be reversed into a user's password and you don't need to show it to the user -- they already know what it is. – Lightness Races in Orbit Dec 10 '12 at 21:19
  • http://brianprograms.blogspot.com.au/2010/07/rot13-c.html – ta.speot.is Dec 10 '12 at 21:22
  • 1
    You don't decrypt passwords. You hash them, and then verify that an attempt hashes identically. – DavidO Dec 10 '12 at 21:56
  • 1
    @DavidO: There are scenarios when you can't hash, e.g. a browser storing passwords for web sites, or Mac OS X's keychain storing passwords and private certificates for applications, an OS storing Wifi access keys etc. – dreamlax Dec 10 '12 at 22:11
  • @dreamlax: None of those scenarios match this one. – Lightness Races in Orbit Dec 11 '12 at 10:33
  • 1
    @LightnessRacesinOrbit: I was only saying that there are legitimate cases where storing the actual password is necessary. DavidO's statement "you don't decrypt passwords" isn't strictly true. – dreamlax Dec 11 '12 at 17:10
  • 1
    @dreamlax: And I don't disagree with you! – Lightness Races in Orbit Dec 11 '12 at 17:53

1 Answers1

8

Keyczar, all the way. It's hands-down the simplest way to do encryption The Right Way.

Keyczar is an open source cryptographic toolkit designed to make it easier and safer for devlopers to use cryptography in their applications. Keyczar supports authentication and encryption with both symmetric and asymmetric keys.

It's about as "plug n play" as you could imagine. Take a look at the C++ tutorial for more.

Matt Ball
  • 354,903
  • 100
  • 647
  • 710