View source code
Display the source code in std/digest/crc.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Alias std.digest.crc.CRC64ISODigest

OOP API CRC64-ISO implementation. See std.digest for differences between template and OOP API.

alias CRC64ISODigest = std.digest.WrapperDigest!(std.digest.crc.CRC!(64,-2882303761517117440L).CRC);

This is an alias for std.digest.WrapperDigest!CRC64ISO, see there for more information.

Example

//Simple example, hashing a string using CRC32Digest.digest helper function
auto crc = new CRC32Digest();
ubyte[] hash = crc.digest("abc");
//Let's get a hash string
writeln(crcHexString(hash)); // "352441C2"

Example

//Let's use the OOP features:
void test(Digest dig)
{
 dig.put(cast(ubyte) 0);
}
auto crc = new CRC32Digest();
test(crc);

//Let's use a custom buffer:
ubyte[4] buf;
ubyte[] result = crc.finish(buf[]);
writeln(crcHexString(result)); // "D202EF8D"

Example

//Simple example
auto hash = new CRC32Digest();
hash.put(cast(ubyte) 0);
ubyte[] result = hash.finish();

Example

//using a supplied buffer
ubyte[4] buf;
auto hash = new CRC32Digest();
hash.put(cast(ubyte) 0);
ubyte[] result = hash.finish(buf[]);
//The result is now in result (and in buf. If you pass a buffer which is bigger than
//necessary, result will have the correct length, but buf will still have it's original
//length)

Authors

Pavel "EvilOne" Minayev, Alex Rønne Petersen, Johannes Pfau

License

Boost License 1.0.