The OpenD Programming Language

digest

This overload of the digest function handles arrays.

  1. DigestType!Hash digest(Range range)
  2. DigestType!Hash digest(T data)
    digest
    (
    Hash
    T...
    )
    (
    scope const T data
    )

Parameters

data T

one or more arrays of any type

Examples

import std.digest.crc, std.digest.md, std.digest.sha;
auto md5   = digest!MD5(  "The quick brown fox jumps over the lazy dog");
auto sha1  = digest!SHA1( "The quick brown fox jumps over the lazy dog");
auto crc32 = digest!CRC32("The quick brown fox jumps over the lazy dog");
assert(toHexString(crc32) == "39A34F41");
import std.digest.crc;
auto crc32 = digest!CRC32("The quick ", "brown ", "fox jumps over the lazy dog");
assert(toHexString(crc32) == "39A34F41");

Meta