GNU Octave 11.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
oct-hash.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2016-2026 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#if ! defined (octave_oct_hash_h)
27#define octave_oct_hash_h 1
28
29#include "octave-config.h"
30
31#include <string>
32
35
36typedef void *(hash_fptr) (const char *buffer, std::size_t len, void *res);
37
38OCTAVE_API std::string
39hash (hash_fptr hash_fcn, const std::string& str, int result_buf_len);
40
49
50OCTAVE_API std::string md2_hash (const std::string& str);
51OCTAVE_API std::string md4_hash (const std::string& str);
52OCTAVE_API std::string md5_hash (const std::string& str);
53OCTAVE_API std::string sha1_hash (const std::string& str);
54OCTAVE_API std::string sha224_hash (const std::string& str);
55OCTAVE_API std::string sha256_hash (const std::string& str);
56OCTAVE_API std::string sha384_hash (const std::string& str);
57OCTAVE_API std::string sha512_hash (const std::string& str);
58
59OCTAVE_API std::string
60hash (const std::string& hash_type, const std::string& str);
61
62OCTAVE_END_NAMESPACE(crypto)
63OCTAVE_END_NAMESPACE(octave)
64
65#endif
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define OCTAVE_API
Definition main.in.cc:55
std::string hash(hash_fptr hash_fcn, const std::string &str, int result_buf_len)
Definition oct-hash.cc:44
int md2_digest_size()
Definition oct-hash.cc:59
std::string md2_hash(const std::string &str)
Definition oct-hash.cc:69
std::string sha256_hash(const std::string &str)
Definition oct-hash.cc:99
std::string sha512_hash(const std::string &str)
Definition oct-hash.cc:111
std::string sha384_hash(const std::string &str)
Definition oct-hash.cc:105
int sha256_digest_size()
Definition oct-hash.cc:64
void *() hash_fptr(const char *buffer, std::size_t len, void *res)
Definition oct-hash.h:36
int md5_digest_size()
Definition oct-hash.cc:61
int sha512_digest_size()
Definition oct-hash.cc:66
int sha1_digest_size()
Definition oct-hash.cc:62
std::string sha224_hash(const std::string &str)
Definition oct-hash.cc:93
std::string sha1_hash(const std::string &str)
Definition oct-hash.cc:87
int md4_digest_size()
Definition oct-hash.cc:60
std::string md4_hash(const std::string &str)
Definition oct-hash.cc:75
int sha384_digest_size()
Definition oct-hash.cc:65
int sha224_digest_size()
Definition oct-hash.cc:63
std::string md5_hash(const std::string &str)
Definition oct-hash.cc:81
F77_RET_T len
Definition xerbla.cc:61