How can I encrypt password on client side and decrypt it on server side?
<p>I want to encrypt my password after created user and persist it inside the DB. I write password to "password field" and press "Save button". Then I use <a href="http://www.jasypt.org/easy-usage.html" rel="nofollow">this library</a></p>

<p>For encryption</p>

<pre><code>        BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
        String encryptedPasword = passwordEncryptor.encryptPassword(myPasword);
        user = new User();
        user.setUsername(username);
        user.setUserRole(role);
        user.setFistname(firstname);
        user.setLastname(lastname);
        user.setGroupId(group);
        user.setBssLogin(login);
        user.setBssPassword(encryptedPasword);
        dao.addCrmUser(user);
</code></pre>

<p>After that, I have a new encrypted password inside my DB.</p>

<p>On the server side, I get the user and try to decrypt the password </p>

<pre><code>String login = user.getLogin();
String password = user.getPassword();
String dencryptPassword = encryptor.**NOT_METHOD_FOR_IT**(password);
</code></pre>

<p>I need the original password, which is set inside another system.
How can I do this with my current library ?</p>

<p>I fount <a href="https://github.com/simbiose/Encryption" rel="nofollow">this</a> and another libraries in Github that use some <code>key</code> but I do not know what is better and/or faster.</p>