Sign in to follow this  
3DModelerMan

salt and hash in plain C or C++

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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++.)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this