V
V
Vasily Vorobyov2015-09-28 12:19:58
C++ / C#
Vasily Vorobyov, 2015-09-28 12:19:58

How to rewrite django auth in c#?

This is how django stores passwords:

pbkdf2_sha256$20000$jo0zZbQiNrBR$MTjatXJlTjTn6x248FwXipHV1MdoA/xuMXkUC1pg48M=

How does it form this line? That is, it is clear that .split('$')[0, 2] = algorithm, hash. What is 20000? Number of iterations? Does it always use sha256 by default? Or selects the algorithm randomly?
The main question is, how can I port the "check_password" method to C#? The above line contains the password "admin". How can I write a method that will turn "admin" into this string?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem Klimenko, 2015-09-28
@zuberok

https://docs.djangoproject.com/en/1.8/topics/auth/...

R
Roman Kitaev, 2015-09-28
@deliro

Start from here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question