You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com> on 2002/09/20 20:10:11 UTC

Password Encryption

I am using authentication against the database. I am storing and geting the 
user parameters from a database. My question is:

How can I encrypt the password to store it then in the database?

Thanks in advance :)

Antonio Gallardo

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Password Encryption

Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
On 20.Sep.2002 -- 12:10 PM, Antonio Gallardo Rivera wrote:
> I am using authentication against the database. I am storing and geting the 
> user parameters from a database. My question is:
> 
> How can I encrypt the password to store it then in the database?
> 
> Thanks in advance :)

If you want to use the modular database actions, there's digest input module
that returns the message digest of a parameter, e.g. a sh1 hash. Since it's
a "meta" module, it needs to obtain the real data from another module:

  <value name="pw" type="string">
    <mode type="new-user" name="digest" salt="salt0815" encode="true">
        <input-module name="request" parameter="user.pw1"/>
    </mode>
  </value>

See javadocs on org.apache.cocoon.components.modules.input for more info.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>