File: sha1.hpp

package info (click to toggle)
unrar-nonfree 1%3A5.2.7-0.1%2Bdeb8u1
  • links: PTS
  • area: non-free
  • in suites: jessie
  • size: 1,344 kB
  • ctags: 3,512
  • sloc: cpp: 24,411; makefile: 124; sh: 10
file content (19 lines) | stat: -rw-r--r-- 422 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef _RAR_SHA1_
#define _RAR_SHA1_

#define HW 5

typedef struct {
    uint32 state[5];
    uint32 count[2];
    unsigned char buffer[64];

    unsigned char workspace[64]; // Temporary buffer.
} sha1_context;

void sha1_init( sha1_context * c );
void sha1_process( sha1_context * c, const byte *data, size_t len,
                   bool handsoff);
void sha1_done( sha1_context * c, uint32[HW], bool handsoff);

#endif