[Issue 12707] New: Wrong SHA1 result for SSE3 64-bit (Win?)
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon May 5 15:13:42 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12707
Issue ID: 12707
Summary: Wrong SHA1 result for SSE3 64-bit (Win?)
Product: D
Version: unspecified
Hardware: x86_64
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: cbkbbejeap at mailinator.com
The following works for 32-bit, but fails on 64-bit (at least on Win64, I
wasn't able to test 64-bit on non-Windows):
----------------------------------
import std.digest.sha;
void main()
{
auto plainText = "hello world";
enum expectedHash = cast(ubyte[20])
x"2aae6c35c94fcfb415dbe95f408b9ce91ee846ed";
assert(sha1Of(plainText) == expectedHash);
}
----------------------------------
If I modify std.digest.sha to disable the SSE3 version, then 64-bit works.
I tested this using DMD 2.065.0. Not sure what other versions may be affected.
--
More information about the Digitalmars-d-bugs
mailing list