title: how to authenticate user in spring security with password encryption
body: <p>i m using spring security in my application.in my database .the password is in encrypted form.so in login when i m sending the password,that password should be converted to the encrypted form then i should be able to compare the password which i m sending and the password which is present in the database.if it matches,successful login should occur.
  this is my spring-security.xml</p>
  
  <pre><code> &lt;authentication-manager"&gt;
          &lt;authentication-provider &gt;
              &lt;password-encoder ref="encoder"/&gt;
                  &lt;jdbc-user-service data-source-ref="dataSource"
                      users-by-username-query="select email,password from user where email=?"
                       /&gt; 
              &lt;/authentication-provider&gt;
  &lt;/authentication-manager&gt;
  &lt;beans:bean id="encoder" class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"/&gt;
  </code></pre>
  
  <p>and here is my user table which contains email,password,contactno,address.
  any help how can i check the encrypted password value for the password which user entering and how to check whether it matechs or not?</p>