Hans Leidekker : bcrypt: Implement BCryptHashData.

Hans Leidekker hans at codeweavers.com
Wed Jan 6 16:05:47 CST 2016


On Thu, 2016-01-07 at 04:32 +0700, Bruno Jesus wrote:
> On Thu, Jan 7, 2016 at 3:50 AM, Alexandre Julliard
> <julliard at wine.codeweavers.com> wrote:
> > +    case ALG_ID_SHA384:
> > +        CC_SHA384_Update( &hash->u.sha512_ctx, input, size );
> > +        break;
> > +
> > +    case ALG_ID_SHA512:
> > +        CC_SHA512_Update( &hash->u.sha512_ctx, input, size );
> > +        break;
> 
> I missed this when I first saw the patches but in a second look and
> judging by the surrounding code I guess there is a copy&paste issue
> here. SHA384 should probably use &hash->u.sha384_ctx, no?

No, CC_SHA384_Update() takes a CC_SHA512_CTX * as the first parameter.
It makes sense because SHA384 is a truncated SHA512 hash.





More information about the wine-devel mailing list