My problem context: Fedora 22 64bit on Linode KVM instance, CouchDB v.1.6.1, SBCL 1.2.16
CouchDB: I create a user with password "testpass"
. The corresponding created document in _users
database contains (among other stuff):
{ ...
"password_scheme": "pbkdf2",
"iterations": 10,
"name": "test",
"roles": ["reader"],
"type": "user",
"derived_key": "7b0cad0d2762b448b88684332e68988e801195ad",
"salt": "2e4bcf85f39279ab9d1e1336a00dce0e"
...}
So in my lisp repl on the same machine I do:
REPL>(in-package :ironclad)
REPL>(byte-array-to-hex-string
(pbkdf2-hash-password
(ascii-string-to-byte-array "testpass")
:salt (hex-string-to-byte-array "2e4bcf85f39279ab9d1e1336a00dce0e")
:digest 'sha1
:iterations 10))
"ce55610fe10bc49703f0df95adb6c9c9c71e3f8e"
REPL>
So the output "ce55610fe10bc49703f0df95adb6c9c9c71e3f8e"
from ironclad doesn't match "7b0cad0d2762b448b88684332e68988e801195ad"
from couch.
I 've tried all the supported digests in ironclad but with no luck. Does anyone have any ideas about what could be wrong?