Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/sha/sha256.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | - | |||||||
9 | - | |||||||
10 | - | |||||||
11 | - | |||||||
12 | - | |||||||
13 | - | |||||||
14 | - | |||||||
15 | int SHA224_Init(SHA256_CTX *c) | - | ||||||
16 | { | - | ||||||
17 | memset (c,0,sizeof(*c)); | - | ||||||
18 | c->h[0]=0xc1059ed8UL; c->h[1]=0x367cd507UL; | - | ||||||
19 | c->h[2]=0x3070dd17UL; c->h[3]=0xf70e5939UL; | - | ||||||
20 | c->h[4]=0xffc00b31UL; c->h[5]=0x68581511UL; | - | ||||||
21 | c->h[6]=0x64f98fa7UL; c->h[7]=0xbefa4fa4UL; | - | ||||||
22 | c->md_len=28; | - | ||||||
23 | return executed 3 times by 1 test: 1;return 1; Executed by:
executed 3 times by 1 test: return 1; Executed by:
| 3 | ||||||
24 | } | - | ||||||
25 | - | |||||||
26 | int SHA256_Init(SHA256_CTX *c) | - | ||||||
27 | { | - | ||||||
28 | memset (c,0,sizeof(*c)); | - | ||||||
29 | c->h[0]=0x6a09e667UL; c->h[1]=0xbb67ae85UL; | - | ||||||
30 | c->h[2]=0x3c6ef372UL; c->h[3]=0xa54ff53aUL; | - | ||||||
31 | c->h[4]=0x510e527fUL; c->h[5]=0x9b05688cUL; | - | ||||||
32 | c->h[6]=0x1f83d9abUL; c->h[7]=0x5be0cd19UL; | - | ||||||
33 | c->md_len=32; | - | ||||||
34 | return executed 3762 times by 9 tests: 1;return 1; Executed by:
executed 3762 times by 9 tests: return 1; Executed by:
| 3762 | ||||||
35 | } | - | ||||||
36 | - | |||||||
37 | unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md) | - | ||||||
38 | { | - | ||||||
39 | SHA256_CTX c; | - | ||||||
40 | static unsigned char m[28]; | - | ||||||
41 | - | |||||||
42 | if (md ==
| 0 | ||||||
43 | ((void *)0)
| 0 | ||||||
44 | ) md=m; never executed: md=m; | 0 | ||||||
45 | SHA224_Init(&c); | - | ||||||
46 | SHA256_Update(&c,d,n); | - | ||||||
47 | SHA256_Final(md,&c); | - | ||||||
48 | explicit_bzero(&c,sizeof(c)); | - | ||||||
49 | return never executed: (md);return(md); never executed: return(md); | 0 | ||||||
50 | } | - | ||||||
51 | - | |||||||
52 | unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md) | - | ||||||
53 | { | - | ||||||
54 | SHA256_CTX c; | - | ||||||
55 | static unsigned char m[32]; | - | ||||||
56 | - | |||||||
57 | if (md ==
| 0 | ||||||
58 | ((void *)0)
| 0 | ||||||
59 | ) md=m; never executed: md=m; | 0 | ||||||
60 | SHA256_Init(&c); | - | ||||||
61 | SHA256_Update(&c,d,n); | - | ||||||
62 | SHA256_Final(md,&c); | - | ||||||
63 | explicit_bzero(&c,sizeof(c)); | - | ||||||
64 | return never executed: (md);return(md); never executed: return(md); | 0 | ||||||
65 | } | - | ||||||
66 | - | |||||||
67 | int SHA224_Update(SHA256_CTX *c, const void *data, size_t len) | - | ||||||
68 | { return never executed: SHA256_Update (c,data,len);return SHA256_Update (c,data,len); never executed: }return SHA256_Update (c,data,len); | 0 | ||||||
69 | int SHA224_Final (unsigned char *md, SHA256_CTX *c) | - | ||||||
70 | { return never executed: SHA256_Final (md,c);return SHA256_Final (md,c); never executed: }return SHA256_Final (md,c); | 0 | ||||||
71 | void sha256_block_data_order (SHA256_CTX *ctx, const void *in, size_t num); | - | ||||||
72 | - | |||||||
Switch to Source code | Preprocessed file |