OpenCPN Partial API docs
Loading...
Searching...
No Matches
flex_hash.h
Go to the documentation of this file.
1
/**************************************************************************
2
* Copyright (C) 2010 by David S. Register *
3
* Copyright (C) 2010 Anton Samsonov *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, see <https://www.gnu.org/licenses/>. *
17
**************************************************************************/
18
25
#ifndef __FLEXHASH_H__
26
#define __FLEXHASH_H__
27
28
#include <vector>
29
#include "ssl/sha1.h"
30
34
class
FlexHash
{
35
public
:
36
FlexHash
(
size_t
output_octets);
37
38
void
Reset(
void
);
39
void
Update(
const
void
* input,
size_t
input_octets);
40
void
Finish(
void
);
41
void
Receive(
void
* output);
42
43
void
Compute(
const
void
* input,
size_t
input_octets,
void
* output);
44
static
void
Compute(
const
void
* input,
size_t
input_octets,
void
* output,
45
size_t
output_octets);
46
47
static
bool
Test(
void
);
48
49
protected
:
50
sha1_context m_Context;
51
std::vector<unsigned char> m_Output;
52
};
53
54
#endif
FlexHash
Class for computing hash of arbitrary length.
Definition
flex_hash.h:34
gui
include
gui
flex_hash.h
Generated on Mon Sep 15 2025 02:43:33 for OpenCPN Partial API docs by
1.9.8