Create FUNDING.yml
[wdl/wdl-ol.git] / WDL / sha.h
blobd6e82afc80f0db9768581a1ed6ebbee82eb1bd80
1 /*
2 WDL - sha.h
3 Copyright (C) 2005 and later, Cockos Incorporated
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
25 This header provides an interface to the WDL_SHA1 object, which performs SHA-1 hashes
26 on data.
29 #ifndef _WDL_SHA_H_
30 #define _WDL_SHA_H_
33 #define WDL_SHA1SIZE 20
35 // sha
37 class WDL_SHA1 {
39 public:
40 WDL_SHA1();
41 void add(const void *data, int datalen);
42 void result(void *out);
43 void reset();
45 private:
47 unsigned int H[5];
48 unsigned int W[80];
49 int lenW;
50 unsigned int size[2];
53 #endif