GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
hash-wrappers.c
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2016-2025 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26// The hash functions are provided by gnulib. We don't include gnulib
27// headers directly in Octave's C++ source files to avoid problems that
28// may be caused by the way that gnulib overrides standard library
29// functions.
30
31#if defined (HAVE_CONFIG_H)
32# include "config.h"
33#endif
34
35#include "md2.h"
36#include "md4.h"
37#include "md5.h"
38#include "sha1.h"
39#include "sha256.h"
40#include "sha512.h"
41
42#include "hash-wrappers.h"
43
44int octave_md2_digest_size (void) { return MD2_DIGEST_SIZE; }
45int octave_md4_digest_size (void) { return MD4_DIGEST_SIZE; }
46int octave_md5_digest_size (void) { return MD5_DIGEST_SIZE; }
47int octave_sha1_digest_size (void) { return SHA1_DIGEST_SIZE; }
48int octave_sha224_digest_size (void) { return SHA224_DIGEST_SIZE; }
49int octave_sha256_digest_size (void) { return SHA256_DIGEST_SIZE; }
50int octave_sha384_digest_size (void) { return SHA384_DIGEST_SIZE; }
51int octave_sha512_digest_size (void) { return SHA512_DIGEST_SIZE; }
52
53void *
54octave_md2_buffer_wrapper (const char *buf, size_t len, void *res)
55{
56 return md2_buffer (buf, len, res);
57}
58
59void *
60octave_md4_buffer_wrapper (const char *buf, size_t len, void *res)
61{
62 return md4_buffer (buf, len, res);
63}
64
65void *
66octave_md5_buffer_wrapper (const char *buf, size_t len, void *res)
67{
68 return md5_buffer (buf, len, res);
69}
70
71void *
72octave_sha1_buffer_wrapper (const char *buf, size_t len, void *res)
73{
74 return sha1_buffer (buf, len, res);
75}
76
77void *
78octave_sha224_buffer_wrapper (const char *buf, size_t len, void *res)
79{
80 return sha224_buffer (buf, len, res);
81}
82
83void *
84octave_sha256_buffer_wrapper (const char *buf, size_t len, void *res)
85{
86 return sha256_buffer (buf, len, res);
87}
88
89void *
90octave_sha384_buffer_wrapper (const char *buf, size_t len, void *res)
91{
92 return sha384_buffer (buf, len, res);
93}
94
95void *
96octave_sha512_buffer_wrapper (const char *buf, size_t len, void *res)
97{
98 return sha512_buffer (buf, len, res);
99}
int octave_sha1_digest_size(void)
int octave_sha256_digest_size(void)
int octave_sha224_digest_size(void)
void * octave_sha1_buffer_wrapper(const char *buf, size_t len, void *res)
void * octave_sha384_buffer_wrapper(const char *buf, size_t len, void *res)
int octave_sha384_digest_size(void)
int octave_md5_digest_size(void)
void * octave_md5_buffer_wrapper(const char *buf, size_t len, void *res)
int octave_sha512_digest_size(void)
int octave_md4_digest_size(void)
void * octave_sha224_buffer_wrapper(const char *buf, size_t len, void *res)
void * octave_md4_buffer_wrapper(const char *buf, size_t len, void *res)
void * octave_sha256_buffer_wrapper(const char *buf, size_t len, void *res)
void * octave_md2_buffer_wrapper(const char *buf, size_t len, void *res)
void * octave_sha512_buffer_wrapper(const char *buf, size_t len, void *res)
int octave_md2_digest_size(void)
F77_RET_T len
Definition xerbla.cc:61