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