| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | #include <stdio.h> | - |
| 11 | #include <string.h> | - |
| 12 | #include <openssl/md5.h> | - |
| 13 | #include <openssl/crypto.h> | - |
| 14 | | - |
| 15 | #ifdef CHARSET_EBCDIC | - |
| 16 | # include <openssl/ebcdic.h> | - |
| 17 | #endif | - |
| 18 | | - |
| 19 | unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md) | - |
| 20 | { | - |
| 21 | MD5_CTX c; | - |
| 22 | static unsigned char m[MD5_DIGEST_LENGTH]; | - |
| 23 | | - |
| 24 | if (md == NULL)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 25 | md = m; never executed: md = m; | 0 |
| 26 | if (!MD5_Init(&c))| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 27 | return NULL; never executed: return ((void *)0) ; | 0 |
| 28 | #ifndef CHARSET_EBCDIC | - |
| 29 | MD5_Update(&c, d, n); | - |
| 30 | #else | - |
| 31 | { | - |
| 32 | char temp[1024]; | - |
| 33 | unsigned long chunk; | - |
| 34 | | - |
| 35 | while (n > 0) { | - |
| 36 | chunk = (n > sizeof(temp)) ? sizeof(temp) : n; | - |
| 37 | ebcdic2ascii(temp, d, chunk); | - |
| 38 | MD5_Update(&c, temp, chunk); | - |
| 39 | n -= chunk; | - |
| 40 | d += chunk; | - |
| 41 | } | - |
| 42 | } | - |
| 43 | #endif | - |
| 44 | MD5_Final(md, &c); | - |
| 45 | OPENSSL_cleanse(&c, sizeof(c)); | - |
| 46 | return md; never executed: return md; | 0 |
| 47 | } | - |
| | |