Skip to content

Bug report: FromHex then MD5/SHA1 has wrong computation  #193

@slurdge

Description

@slurdge

Summary

When using FromHex then MD5 computation recipe, sometimes, the hash is wrong.
It seems that bytes >= 0x80 have a problem with the transformation.

Example

See the following example:

screen shot 2017-10-08 at 16 43 33

The correct hash for a single 0x80 byte should be:

>>> import hashlib
>>> hashlib.md5(bytes([0x80])).hexdigest()
'8d39dd7eef115ea6975446ef4082951f'

Possible solutions

It seems that at least another online tool is failing at this: https://cryptii.com/hexadecimal/md5
Note that the result for SHA1 is also wrong. However, the new version https://v4.cryptii.com/enigma outputs the correct result.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions