Ddh

Undocumented in source.

Members

Functions

aliasName
string aliasName()
Undocumented in source. Be warned that the author may not have intended to support it.
finish
ubyte[] finish()
Undocumented in source. Be warned that the author may not have intended to support it.
fullName
string fullName()
Undocumented in source. Be warned that the author may not have intended to support it.
initiate
int initiate(HashType t)
Undocumented in source. Be warned that the author may not have intended to support it.
key
void key(const(ubyte)[] input)
Undocumented in source. Be warned that the author may not have intended to support it.
length
size_t length()
Undocumented in source. Be warned that the author may not have intended to support it.
put
void put(const(ubyte)[] input)
Undocumented in source. Be warned that the author may not have intended to support it.
reset
void reset()
Undocumented in source. Be warned that the author may not have intended to support it.
seed
void seed(uint input)
Undocumented in source. Be warned that the author may not have intended to support it.
tagName
string tagName()
Undocumented in source. Be warned that the author may not have intended to support it.
toBase64
const(char)[] toBase64()
Undocumented in source. Be warned that the author may not have intended to support it.
toHex
const(char)[] toHex()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

checksum
bool checksum;
Undocumented in source.
digest
Digest digest;
Undocumented in source.
info
immutable(HashInfo)* info;
Undocumented in source.
result
ubyte[] result;
Undocumented in source.
type
HashType type;
Undocumented in source.

Examples

import std.conv : hexString;

Ddh ddh = void;
ddh.initiate(HashType.CRC32);
ddh.put(cast(ubyte[]) "abc");
assert(ddh.finish() == cast(ubyte[]) hexString!"c2412435");
assert(ddh.toHex() == "352441c2");

ddh.initiate(HashType.SHA3_256);
ddh.put(cast(ubyte[]) "abc");
assert(ddh.finish() == cast(ubyte[]) hexString!(
        "3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532"));
assert(ddh.toHex() ==
        "3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532");

Meta