Password storage format

32 views
Skip to first unread message

Camilo

unread,
Feb 7, 2016, 12:32:01 AM2/7/16
to web2py-users
Hi,

So am trying to validate passwords against a db generated by web2py.

The format is "pbkdf2(N,M,sha512)$X$Y". I suppose N is iterations (although it seems kind of low), X is salt and Y is encrypted. What would M be?

Thank you

Massimo Di Pierro

unread,
Feb 7, 2016, 12:50:31 AM2/7/16
to web2py-users
N is iterations and M is key length.
You can use the CRYPT validator to check them automatically

>>> alg = 'pbkdf2(1000,20,sha512)' 

>>> a = str(CRYPT(digest_alg=alg,salt=True)('test')[0])

>>> a == 'pbkdf2(1000,20,sha512)$...$...'
Reply all
Reply to author
Forward
0 new messages