You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nguyen Xuan Son <ya...@gmail.com> on 2009/11/30 05:34:05 UTC
password encrypted
Dear all
i would like to encrypted the password into sha1 code
although I tried to search whether is there any class that I can simply use
as i did in PHP (just simply use the method sha1(string)) but failed
do you have any suggestion?
thank you very much
--
=======================================================================
Ritsumeikan University, Asia JinZai Project
Master of Information Science
Nguyen Xuan Son
Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu
Rien, Room 103
Tel/Fax : 81-(0)90-3976 2246
Email : nr0003xx@ed.ritsumei.ac.jp
Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp
=======================================================================
Re: password encrypted
Posted by Saeed Iqbal <sa...@gmail.com>.
Are you using Spring Security? Its very simple then.
On Mon, Nov 30, 2009 at 9:34 AM, Nguyen Xuan Son <ya...@gmail.com> wrote:
> Dear all
> i would like to encrypted the password into sha1 code
> although I tried to search whether is there any class that I can simply use
> as i did in PHP (just simply use the method sha1(string)) but failed
> do you have any suggestion?
>
> thank you very much
>
> --
> =======================================================================
> Ritsumeikan University, Asia JinZai Project
> Master of Information Science
> Nguyen Xuan Son
>
> Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> ShiteiHaimu
> Rien, Room 103
> Tel/Fax : 81-(0)90-3976 2246
> Email : nr0003xx@ed.ritsumei.ac.jp
> Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp
> =======================================================================
>
--
Saeed Iqbal
Independant Consultant (Freelance)
Struts - J2EE - Application Architect / Developer
Re: password encrypted
Posted by Chris Pratt <th...@gmail.com>.
The PHP appears to be encoded somehow, whereas the Java is a pure number.
Looks like you have a bit of research ahead.
(*Chris*)
On Sun, Nov 29, 2009 at 9:01 PM, Nguyen Xuan Son <ya...@gmail.com> wrote:
> Dear Chris
> after I encrypted the password into sha1 code
> with the string "123456" i got the
> result:
> 124-74-141-9-202-55-98-175-97-229-149-32-148-61-194-100-148-248-148-27
> but it looks different from what i've made by using PHP method:
> ?2S?j?k?-Jo?=? ???A?? J??v!??3?H????m?F?? ?? ?^??? y~??? Td????
> is there any problem
>
> 2009/11/30 Chris Pratt <th...@gmail.com>
>
> > java.security.MessageDigest
> > (*Chris*)
> >
> > On Sun, Nov 29, 2009 at 8:34 PM, Nguyen Xuan Son <ya...@gmail.com>
> > wrote:
> >
> > > Dear all
> > > i would like to encrypted the password into sha1 code
> > > although I tried to search whether is there any class that I can simply
> > use
> > > as i did in PHP (just simply use the method sha1(string)) but failed
> > > do you have any suggestion?
> > >
> > > thank you very much
> > >
> > > --
> > > =======================================================================
> > > Ritsumeikan University, Asia JinZai Project
> > > Master of Information Science
> > > Nguyen Xuan Son
> > >
> > > Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> > > ShiteiHaimu
> > > Rien, Room 103
> > > Tel/Fax : 81-(0)90-3976 2246
> > > Email : nr0003xx@ed.ritsumei.ac.jp
> > > Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp
> > > =======================================================================
> > >
> >
>
>
>
> --
> =======================================================================
> Ritsumeikan University, Asia JinZai Project
> Master of Information Science
> Nguyen Xuan Son
>
> Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> ShiteiHaimu
> Rien, Room 103
> Tel/Fax : 81-(0)90-3976 2246
> Email : nr0003xx@ed.ritsumei.ac.jp
> Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp
> =======================================================================
>
Re: password encrypted
Posted by Nguyen Xuan Son <ya...@gmail.com>.
Dear Chris
after I encrypted the password into sha1 code
with the string "123456" i got the
result: 124-74-141-9-202-55-98-175-97-229-149-32-148-61-194-100-148-248-148-27
but it looks different from what i've made by using PHP method:
?2S?j?k?-Jo?=????A??J??v!??3?H????m?F?????^???y~???Td????
is there any problem
2009/11/30 Chris Pratt <th...@gmail.com>
> java.security.MessageDigest
> (*Chris*)
>
> On Sun, Nov 29, 2009 at 8:34 PM, Nguyen Xuan Son <ya...@gmail.com>
> wrote:
>
> > Dear all
> > i would like to encrypted the password into sha1 code
> > although I tried to search whether is there any class that I can simply
> use
> > as i did in PHP (just simply use the method sha1(string)) but failed
> > do you have any suggestion?
> >
> > thank you very much
> >
> > --
> > =======================================================================
> > Ritsumeikan University, Asia JinZai Project
> > Master of Information Science
> > Nguyen Xuan Son
> >
> > Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> > ShiteiHaimu
> > Rien, Room 103
> > Tel/Fax : 81-(0)90-3976 2246
> > Email : nr0003xx@ed.ritsumei.ac.jp
> > Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp
> > =======================================================================
> >
>
--
=======================================================================
Ritsumeikan University, Asia JinZai Project
Master of Information Science
Nguyen Xuan Son
Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu
Rien, Room 103
Tel/Fax : 81-(0)90-3976 2246
Email : nr0003xx@ed.ritsumei.ac.jp
Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp
=======================================================================
Re: password encrypted
Posted by Chris Pratt <th...@gmail.com>.
java.security.MessageDigest
(*Chris*)
On Sun, Nov 29, 2009 at 8:34 PM, Nguyen Xuan Son <ya...@gmail.com> wrote:
> Dear all
> i would like to encrypted the password into sha1 code
> although I tried to search whether is there any class that I can simply use
> as i did in PHP (just simply use the method sha1(string)) but failed
> do you have any suggestion?
>
> thank you very much
>
> --
> =======================================================================
> Ritsumeikan University, Asia JinZai Project
> Master of Information Science
> Nguyen Xuan Son
>
> Add : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> ShiteiHaimu
> Rien, Room 103
> Tel/Fax : 81-(0)90-3976 2246
> Email : nr0003xx@ed.ritsumei.ac.jp
> Mobile : 81-(0)90-3976 2246 URL : http://www.ritsumei.jp
> =======================================================================
>