Debian Codegraph @

bindings/mono/doc/ns-RHash.xml

raw
1 <Namespace Name="RHash">
2 <Docs>
3 <summary>.NET/Mono bindings to librhash.</summary>
4 <remarks>
5 <para>Librhash is a library for computing hash functions.
6 It supports many hashing algorithms. This module provides
7 class for incremental hashing that utilizes the library.
8 Sample usage of it you can see from the following example:
9 <example><code lang="C#">
10 Hasher hasher = new Hasher((uint)HashType.CRC32 | (uint)HashType.MD5);
11 hasher.Update(bytebuffer).UpdateFile("SomeFile.txt");
12 hasher.Finish();
13 Console.WriteLine(hasher.ToHex(HashType.CRC32));
14 Console.WriteLine(hasher.ToBase32(HashType.MD5));</code></example>
15 </para><para>
16 In this example <see cref="T:RHash.Hasher" /> object is first
17 created for a set of hashing algorithms.
18 </para><para>
19 Next, data for hashing is given in chunks with methods
20 Update() and UpdateFile(). Finally, call Finish() to end up
21 all remaining calculations.
22 </para><para>
23 To receive text represenation of the message digest use one
24 of the methods ToHex(), ToBase32() and ToBase64(). Binary message
25 digest may be obtained with ToRaw(). All of these methods accept
26 algorithm value as argument. It may be omitted if Hasher was
27 created to compute hash for only a single hashing algorithm.
28 </para>
29 </remarks>
30 </Docs>
31 </Namespace>