1 /*
2  * Base16 stream functions
3  *
4  * Copyright (C) 2008-2018, Joachim Metz <joachim.metz@gmail.com>
5  *
6  * Refer to AUTHORS for acknowledgements.
7  *
8  * This software is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This software is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this software.  If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #if !defined( _LIBUNA_BASE16_STREAM_H )
23 #define _LIBUNA_BASE16_STREAM_H
24 
25 #include <common.h>
26 #include <types.h>
27 
28 #include "libuna_extern.h"
29 #include "libuna_libcerror.h"
30 #include "libuna_types.h"
31 
32 #if defined( __cplusplus )
33 extern "C" {
34 #endif
35 
36 LIBUNA_EXTERN \
37 int libuna_base16_stream_size_to_byte_stream(
38      const uint8_t *base16_stream,
39      size_t base16_stream_size,
40      size_t *byte_stream_size,
41      uint32_t base16_variant,
42      uint8_t flags,
43      libcerror_error_t **error );
44 
45 LIBUNA_EXTERN \
46 int libuna_base16_stream_copy_to_byte_stream(
47      const uint8_t *base16_stream,
48      size_t base16_stream_size,
49      uint8_t *byte_stream,
50      size_t byte_stream_size,
51      uint32_t base16_variant,
52      uint8_t flags,
53      libcerror_error_t **error );
54 
55 LIBUNA_EXTERN \
56 int libuna_base16_stream_size_from_byte_stream(
57      const uint8_t *byte_stream,
58      size_t byte_stream_size,
59      size_t *base16_stream_size,
60      uint32_t base16_variant,
61      libcerror_error_t **error );
62 
63 LIBUNA_EXTERN \
64 int libuna_base16_stream_copy_from_byte_stream(
65      uint8_t *base16_stream,
66      size_t base16_stream_size,
67      const uint8_t *byte_stream,
68      size_t byte_stream_size,
69      uint32_t base16_variant,
70      libcerror_error_t **error );
71 
72 LIBUNA_EXTERN \
73 int libuna_base16_stream_with_index_copy_from_byte_stream(
74      uint8_t *base16_stream,
75      size_t base16_stream_size,
76      size_t *base16_stream_index,
77      const uint8_t *byte_stream,
78      size_t byte_stream_size,
79      uint32_t base16_variant,
80      libcerror_error_t **error );
81 
82 #if defined( __cplusplus )
83 }
84 #endif
85 
86 #endif /* !defined( _LIBUNA_BASE16_STREAM_H ) */
87 
88