[d6386d]: pwsafe / pwsafe / corelib / sha1.h  Maximize  Restore  History

Download this file

26 lines (24 with data), 638 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
* Copyright (c) 2003-2007 Rony Shapiro <ronys@users.sourceforge.net>.
* All rights reserved. Use of the code is allowed under the
* Artistic License terms, as specified in the LICENSE file
* distributed with this code, or available from
* http://www.opensource.org/licenses/artistic-license.php
*/
#ifndef _SHA1_H_
#define _SHA1_H_
#include "PwsPlatform.h"
class SHA1
{
public:
enum {HASHLEN = 20};
SHA1();
~SHA1();
void Update(const unsigned char* data, unsigned int len);
void Final(unsigned char digest[HASHLEN]);
private:
unsigned long state[5];
unsigned long count[2];
unsigned char buffer[64];
};
#endif

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks