# Re: SHA Message Disgest from SUN, <in progress>

Jan Luehe (Jan.Luehe@eng.sun.com)
Thu, 11 Mar 1999 15:12:11 -0800 (PST)

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: rhodson@jdhtech.com: "signed jars"
- Previous message: Tobias Hintze: "sun.security.acl.*"

    Date: Thu, 11 Mar 1999 15:12:11 -0800 (PST)

    From: Jan Luehe <Jan.Luehe@eng.sun.com>

    Subject: Re: SHA Message Disgest from SUN, <in progress>

    To: java-security@java.sun.com, staggs@mail.cistw.saic.com

You need to call "md.digest()" when you are done
updating, which will complete the digest operation.

While updating, your digest is still "in progress",
as the output message says.

Jan

> I am reimplementing my auto-athentication code in JAVA and
> needed to compare a cleartext password with the SHA-1
> encrypted password. After:
>
> successfully calling
> MessageDigest.getInstance("SHA")
>
> and updating each byte into the digest:
> for(i=0; i<plen;i++){
> x = (byte) (passwd.charAt(i) & 0xff);
> md.update(x);
> }
> System.out.println(md.toString());
>
> I get the unexpected output:
> SHA Message Disgest from SUN, <in progress>
>
> I am sure that someone really thought this would be self-
> explanatory when they inserted this message. I doubt
> the SHA is not implemented in JDK1.2 for Solaris. Anyone
> writing an abiguous message like this should be required
> to include his/her phone number. Where can I get official
> interpretation (not found in a seacrh of JAVA Connection
> web site) of this message, before I get fired?
>
> DS

- Next message: rhodson@jdhtech.com: "signed jars"
- Previous message: Tobias Hintze: "sun.security.acl.*"