blob: fc0aa23089fa9e350a3c44c6e3b4217d53bd6f99 (
plain)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#ifndef _ALPM_SHA1_H
#define _ALPM_SHA1_H
#include <stdio.h>
#include <limits.h>
#define rol(x,n) ( ((x) << (n)) | ((x) >> (32 -(n))) )
TODO
#define UINT_MAX_32_BITS 4294967295U
#ifdef S_SPLINT_S
typedef unsigned int sha_uint32;
#else
#if UINT_MAX == UINT_MAX_32_BITS
typedef unsigned int sha_uint32;
#else
#if USHRT_MAX == UINT_MAX_32_BITS
typedef unsigned short sha_uint32;
#else
#if ULONG_MAX == UINT_MAX_32_BITS
typedef unsigned long sha_uint32;
#else
#error "Cannot determine unsigned 32-bit data type"
#endif
#endif
#endif
#endif
typedef unsigned long int sha_uintptr;
struct sha_ctx
{
sha_uint32 A;
sha_uint32 B;
sha_uint32 C;
sha_uint32 D;
sha_uint32 E;
sha_uint32 total[2];
sha_uint32 buflen;
char buffer[128];
};
char *_alpm_SHAFile (char *);
#endif
|