1 | /* -*- Mode: c; c-basic-offset: 2 -*- |
2 | * |
3 | * rdf_digest.h - RDF Digest Factory / Digest interfaces and definition |
4 | * |
5 | * Copyright (C) 2000-2008, David Beckett http://www.dajobe.org/ |
6 | * Copyright (C) 2000-2005, University of Bristol, UK http://www.bristol.ac.uk/ |
7 | * |
8 | * This package is Free Software and part of Redland http://librdf.org/ |
9 | * |
10 | * It is licensed under the following three licenses as alternatives: |
11 | * 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version |
12 | * 2. GNU General Public License (GPL) V2 or any newer version |
13 | * 3. Apache License, V2.0 or any newer version |
14 | * |
15 | * You may not use this file except in compliance with at least one of |
16 | * the above three licenses. |
17 | * |
18 | * See LICENSE.html or LICENSE.txt at the top of this package for the |
19 | * complete terms and further detail along with the license texts for |
20 | * the licenses in COPYING.LIB, COPYING and LICENSE-2.0.txt respectively. |
21 | * |
22 | * |
23 | */ |
24 | |
25 | |
26 | |
27 | #ifndef LIBRDF_DIGEST_H |
28 | #define LIBRDF_DIGEST_H |
29 | |
30 | #ifdef LIBRDF_INTERNAL |
31 | #include <rdf_digest_internal.h> |
32 | #endif |
33 | |
34 | #ifdef __cplusplus |
35 | extern "C" { |
36 | #endif |
37 | |
38 | /* public constructor */ |
39 | REDLAND_API |
40 | librdf_digest* librdf_new_digest(librdf_world *world, const char *name); |
41 | |
42 | /* destructor */ |
43 | REDLAND_API |
44 | void librdf_free_digest(librdf_digest *digest); |
45 | |
46 | |
47 | /* methods */ |
48 | REDLAND_API |
49 | void librdf_digest_init(librdf_digest* digest); |
50 | REDLAND_API |
51 | void librdf_digest_update(librdf_digest* digest, const unsigned char *buf, size_t length); |
52 | REDLAND_API |
53 | void librdf_digest_update_string(librdf_digest* digest, const unsigned char *string); |
54 | REDLAND_API |
55 | void librdf_digest_final(librdf_digest* digest); |
56 | REDLAND_API |
57 | void* librdf_digest_get_digest(librdf_digest* digest); |
58 | REDLAND_API |
59 | size_t librdf_digest_get_digest_length(librdf_digest* digest); |
60 | |
61 | REDLAND_API |
62 | char* librdf_digest_to_string(librdf_digest* digest); |
63 | REDLAND_API |
64 | void librdf_digest_print(librdf_digest* digest, FILE* fh); |
65 | |
66 | #ifdef __cplusplus |
67 | } |
68 | #endif |
69 | |
70 | #endif |
71 | |