libewf_hash_values.h 3.9 KB
Newer Older
1
/*
2
 * Hash values functions
3
 *
4
 * Copyright (C) 2006-2017, Joachim Metz <joachim.metz@gmail.com>
5 6 7
 *
 * Refer to AUTHORS for acknowledgements.
 *
8 9 10 11
 * This software is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
12
 *
13 14 15 16
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
17
 *
18 19
 * You should have received a copy of the GNU Lesser General Public License
 * along with this software.  If not, see <http://www.gnu.org/licenses/>.
20 21 22 23 24 25
 */

#if !defined( _LIBEWF_HASH_VALUES_H )
#define _LIBEWF_HASH_VALUES_H

#include <common.h>
26
#include <types.h>
27

28
#include "libewf_libcerror.h"
29
#include "libewf_libfvalue.h"
30 31 32 33 34 35

#if defined( __cplusplus )
extern "C" {
#endif

int libewf_hash_values_initialize(
36
     libfvalue_table_t **hash_values,
37
     libcerror_error_t **error );
38 39

int libewf_hash_values_parse_md5_hash(
40
     libfvalue_table_t *hash_values,
41
     const uint8_t *md5_hash,
42
     size_t md5_hash_size,
43
     libcerror_error_t **error );
44 45

int libewf_hash_values_parse_sha1_hash(
46
     libfvalue_table_t *hash_values,
47
     const uint8_t *sha1_hash,
48
     size_t sha1_hash_size,
49
     libcerror_error_t **error );
50

51
int libewf_hash_values_parse_xhash(
52 53
     libfvalue_table_t *hash_values,
     const uint8_t *xhash,
54
     size_t xhash_size,
55
     libcerror_error_t **error );
56

57 58
int libewf_hash_values_generate_xhash(
     libfvalue_table_t *hash_values,
59 60
     uint8_t **xhash,
     size_t *xhash_size,
61
     libcerror_error_t **error );
62 63

int libewf_hash_values_generate_md5_hash(
64
     libfvalue_table_t *hash_values,
65 66 67
     uint8_t *md5_hash,
     size_t md5_hash_size,
     uint8_t *md5_hash_set,
68
     libcerror_error_t **error );
69

70
int libewf_hash_values_generate_sha1_hash(
71
     libfvalue_table_t *hash_values,
72 73 74
     uint8_t *sha1_hash,
     size_t sha1_hash_size,
     uint8_t *sha1_hash_set,
75
     libcerror_error_t **error );
76

77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
int libewf_hash_values_get_identifier_size(
     libfvalue_table_t *hash_values,
     uint32_t index,
     size_t *identifier_size,
     libcerror_error_t **error );

int libewf_hash_values_get_identifier(
     libfvalue_table_t *hash_values,
     uint32_t index,
     uint8_t *identifier,
     size_t identifier_size,
     libcerror_error_t **error );

int libewf_hash_values_get_utf8_value_size(
     libfvalue_table_t *hash_values,
     const uint8_t *identifier,
     size_t identifier_length,
     size_t *utf8_string_size,
     libcerror_error_t **error );

int libewf_hash_values_get_utf8_value(
     libfvalue_table_t *hash_values,
     const uint8_t *identifier,
     size_t identifier_length,
     uint8_t *utf8_string,
     size_t utf8_string_size,
     libcerror_error_t **error );

int libewf_hash_values_set_utf8_value(
     libfvalue_table_t *hash_values,
     const uint8_t *identifier,
     size_t identifier_length,
     const uint8_t *utf8_string,
     size_t utf8_string_length,
     libcerror_error_t **error );

int libewf_hash_values_get_utf16_value_size(
     libfvalue_table_t *hash_values,
     const uint8_t *identifier,
     size_t identifier_length,
     size_t *utf16_string_size,
     libcerror_error_t **error );

int libewf_hash_values_get_utf16_value(
     libfvalue_table_t *hash_values,
     const uint8_t *identifier,
     size_t identifier_length,
     uint16_t *utf16_string,
     size_t utf16_string_size,
     libcerror_error_t **error );

int libewf_hash_values_set_utf16_value(
     libfvalue_table_t *hash_values,
     const uint8_t *identifier,
     size_t identifier_length,
     const uint16_t *utf16_string,
     size_t utf16_string_length,
     libcerror_error_t **error );

136 137 138 139
#if defined( __cplusplus )
}
#endif

140
#endif /* !defined( _LIBEWF_HASH_VALUES_H ) */
141