Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18221 closed defect (fixed)

unnecessary data conversion in in dojox/encoding/digests/SHA256,SHA512

Reported by: Jason Cheatham Owned by: Adam Peller
Priority: undecided Milestone: 1.9.4
Component: Dojox Version: 1.10.0
Keywords: Cc:
Blocked By: Blocking:

Description

At the beginning of the SHAx._hmac method, both the input data and key are transformed using sha32.stringToUtf8. This transformation should not generally be necessary, and it prevents successive calls of _hmac on binary data from giving the expected results. For example:

SHA256._hmac('', SHA256._hmac('', '', sha32.outputTypes.String),
    sha32.outputTypes.Hex)

should give the digest 73162f0c7b25791ff61bc44ef76d89f0d3d5b6c84e289d23f9eb90fc70f4121f. Assuming the fix from #17733 is applied, you get 5f86813f775de3bf75b86e29fc01a60ad82f39a3a4ccfc6d88974179f195c9cd. If the stringToUtf8 conversions are removed, you get the expected answer.

Change History (6)

comment:1 Changed 5 years ago by bill

Component: GeneralDojox
Owner: set to Adam Peller

comment:3 Changed 5 years ago by Colin Snover <github.com@…>

Resolution: fixed
Status: newclosed

In f8273c955e892ec21fbe10322508ddb362051a60/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:3 Changed 5 years ago by Colin Snover <github.com@…>

Resolution: fixed
Status: newclosed

In 22b4fd095c53bfef5644b2afeef823f4524af127/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:4 Changed 5 years ago by Colin Snover <github.com@…>

In d6cea8e80f1587c94b90b97b288a40e29c8a4dea/dojox:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 

comment:5 Changed 5 years ago by Colin Snover

Milestone: tbd1.9.4
Note: See TracTickets for help on using tickets.