SHA-256: Difference between revisions

Content added Content deleted
Line 1,316: Line 1,316:
pure nothrow @nogc in {
pure nothrow @nogc in {
assert(inBuffer.length % 64 == 0);
assert(inBuffer.length % 64 == 0);
} body {
} do {
// Round functions.
// Round functions.
static uint F1(in uint e, in uint f, in uint g) pure nothrow @safe @nogc {
static uint F1(in uint e, in uint f, in uint g) pure nothrow @safe @nogc {
Line 1,567: Line 1,567:
<pre>764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf</pre>
<pre>764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf</pre>
This is a moderately efficient implementation, about 100 MB/s on a 4096 bytes input buffer on a 32 bit system, using the ldc2 compiler. On a more modern CPU (Intel Ivy Bridge) using HyperThreading, handwritten assembly by Intel is about twice faster.
This is a moderately efficient implementation, about 100 MB/s on a 4096 bytes input buffer on a 32 bit system, using the ldc2 compiler. On a more modern CPU (Intel Ivy Bridge) using HyperThreading, handwritten assembly by Intel is about twice faster.

=={{header|Delphi}}==
=={{header|Delphi}}==
{{libheader| System.SysUtils}}
{{libheader| System.SysUtils}}