Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


salt and hash in plain C or C++


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 3DModelerMan   Members   -  Reputation: 1024

Like
0Likes
Like

Posted 21 September 2012 - 07:21 PM

I'm trying to write an interface to my database on Cloudant using C++ and cUrl. I've been able to query stuff and run GET requests, and I've been able to POST documents and databases to create them. But now I'm trying to store users in the _users database. I've created the _users database and now I want to be able to add users to it. The problem is that Cloudant wants you to salt and hash the password on your side:
http://support.cloudant.com/customer/portal/articles/359311-users-authorization-on-cloudant but from C++ (on Android and Windows) I can't run those commands that they show.

Sponsor:

#2 hplus0603   Moderators   -  Reputation: 5538

Like
2Likes
Like

Posted 21 September 2012 - 07:42 PM

Crypto++ is a high quality, free license cryptographic library for C++.
The command they use to generate a salt is basically just a high quality random number generator (which is included in Crypto++ if your OS supports something like the crypto random number service or /dev/random.)
The command they use for hashing the key just shows that they use the hex encoding of the sha1 hash of the password, which is a medium-strength hash function (well supported in Crypto++.)

enum Bool { True, False, FileNotFound };

#3 KnolanCross   Members   -  Reputation: 1335

Like
0Likes
Like

Posted 29 September 2012 - 02:07 PM

They are using openSSL, it is an open source library, you can download it here http://www.openssl.org/ .

Currently working on a scene editor for ORX (http://orx-project.org), using kivy (http://kivy.org).





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS