S
S
sandrosklyarov2017-05-27 17:23:16
PHP
sandrosklyarov, 2017-05-27 17:23:16

How to encrypt password stored on LDAP server in Java application?

The LDAP server stores user logins and passwords (encrypted). In a Java application, users enter their data, the login and encrypted password are sent to a php script that checks the correctness of the data.
On the server, passwords are encrypted with the SSHA algorithm, which uses a salt (a random sequence of characters), and the salt is randomly set and it is not clear where it is stored.
A Java application must encrypt the password in the form in which it is stored on the server, but how to pick up the salt?
Actually, the question is: how to implement this? Is it possible, for example, to encrypt in SHA without a salt, and in a php script check already in such a cipher (I know for sure that there is a function that checks a password without a cipher at all and with the cipher that is used on the server, maybe there is a function, which will check the password with any hashing algorithm?) Or is it possible to implement something else?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan Lopatin, 2017-05-28
@lorus

Python code: https://gist.github.com/rca/7217540

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question