Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | #include <stdio.h> | - |
11 | #include <string.h> | - |
12 | #include <openssl/crypto.h> | - |
13 | #include <openssl/sha.h> | - |
14 | | - |
15 | unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md) | - |
16 | { | - |
17 | SHA_CTX c; | - |
18 | static unsigned char m[SHA_DIGEST_LENGTH]; | - |
19 | | - |
20 | if (md == NULL)TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
21 | md = m; never executed: md = m; | 0 |
22 | if (!SHA1_Init(&c))TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
| 0-7 |
23 | return NULL; never executed: return ((void *)0) ; | 0 |
24 | SHA1_Update(&c, d, n); | - |
25 | SHA1_Final(md, &c); | - |
26 | OPENSSL_cleanse(&c, sizeof(c)); | - |
27 | return md;executed 7 times by 1 test: return md; | 7 |
28 | } | - |
| | |