dextool.hash

Members

Aliases

BuildChecksum128
alias BuildChecksum128 = MurmurHash3!(128, 64)
Undocumented in source.
BuildChecksum64
alias BuildChecksum64 = CRC64ISO
Undocumented in source.
Checksum128
alias Checksum128 = Murmur3
Undocumented in source.
Checksum64
alias Checksum64 = Crc64Iso
Undocumented in source.
makeChecksum128
alias makeChecksum128 = makeMurmur3
Undocumented in source.
makeChecksum64
alias makeChecksum64 = makeCrc64Iso
Undocumented in source.
toChecksum128
alias toChecksum128 = toMurmur3
Undocumented in source.
toChecksum64
alias toChecksum64 = toCrc64Iso
Undocumented in source.

Functions

makeCrc64Iso
Crc64Iso makeCrc64Iso(const(ubyte)[] p)

Create a 64bit hash.

makeHash
ulong makeHash(T raw)

Make a 32bit hash.

makeMurmur3
Murmur3 makeMurmur3(const(ubyte)[] p)
Undocumented in source. Be warned that the author may not have intended to support it.
toBytes
auto toBytes(T v)

Convert a value to its ubyte representation.

toCrc64Iso
Crc64Iso toCrc64Iso(const(ubyte)[8] p)

Convenient function to convert to a checksum type.

toCrc64Iso
Crc64Iso toCrc64Iso(BuildChecksum64 h)
Undocumented in source. Be warned that the author may not have intended to support it.
toMurmur3
Murmur3 toMurmur3(const(ubyte)[16] p)

Convenient function to convert to a checksum type.

toMurmur3
Murmur3 toMurmur3(BuildChecksum128 h)
Undocumented in source. Be warned that the author may not have intended to support it.
toSizeT
size_t toSizeT(T v)
size_t toSizeT(const(ubyte)[4] v)
size_t toSizeT(const(ubyte)[8] v)

Convert to size_to for use in e.g. operator overload toHash.

toUlong
ulong toUlong(ubyte[8] v)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Crc64Iso
struct Crc64Iso

64-bit checksum.

Murmur3
struct Murmur3

128bit hash.

Meta

License

MPL-2

Authors

Joakim Brännström (joakim.brannstrom@gmx.com)

This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

This module contains functionality to calculate hashes for use as e.g. checksums. The intention is to have the *same* algorithm being used for the same *things* in Dextool.

This is to make it easier to integrate with Dextool produced data.

*Prefer** the 128-bit hash.

Use the 64-bit if you have to for compatibility reasons with other services not part of dextool.

*Warning**: These may not be endian independent.

TODO: rename ChecksumXX to HashXX.