36c36,37
< #include "digest.h"
---
> #include <netpgp/digest.h>
>
39,42d39
< #ifndef USE_ARG
< #define USE_ARG(x) /*LINTED*/(void)&(x)
< #endif
<
45c42
< don_armor(digest_t *hash, uint8_t *in, size_t insize, int doarmor)
---
> don_armor(digest_t *hash, uint8_t *in, size_t insize)
48d44
< uint8_t *newp;
55,60c51
< for (newp = p ; doarmor == 'w' && newp > from ; --newp) {
< if (*(newp - 1) != ' ' && *(newp - 1) != '\t') {
< break;
< }
< }
< digest_update(hash, from, (size_t)(newp - from));
---
> digest_update(hash, from, (size_t)(p - from));
110c101
< calcsum(uint8_t *out, size_t size, uint8_t *mem, size_t cc, const uint8_t *hashed, size_t hashsize, int doarmor)
---
> calcsum(uint8_t *out, size_t size, const char *name, uint8_t *mem, size_t cc, const uint8_t *hashed, size_t hashsize, int doarmor)
118d108
< USE_ARG(size);
130,131c120,121
< digest_init(&hash, (const unsigned)hashalg);
< if (strchr("tw", doarmor) != NULL && !already_armored(mem, cc)) {
---
> digest_init(&hash, hashalg);
> if (doarmor && !already_armored(mem, cc)) {
133c123
< don_armor(&hash, mem, cc - 1, doarmor);
---
> don_armor(&hash, mem, cc - 1);
174c164
< ret = calcsum(data, size, mem, cc, hashed, hashsize, doarmor);
---
> ret = calcsum(data, size, name, mem, cc, hashed, hashsize, doarmor);
191c181
< return calcsum(data, size, mem, cc, hashed, hashsize, doarmor);
---
> return calcsum(data, size, "[memory]", mem, cc, hashed, hashsize, doarmor);
< #include "digest.h"
---
> #include <netpgp/digest.h>
>
39,42d39
< #ifndef USE_ARG
< #define USE_ARG(x) /*LINTED*/(void)&(x)
< #endif
<
45c42
< don_armor(digest_t *hash, uint8_t *in, size_t insize, int doarmor)
---
> don_armor(digest_t *hash, uint8_t *in, size_t insize)
48d44
< uint8_t *newp;
55,60c51
< for (newp = p ; doarmor == 'w' && newp > from ; --newp) {
< if (*(newp - 1) != ' ' && *(newp - 1) != '\t') {
< break;
< }
< }
< digest_update(hash, from, (size_t)(newp - from));
---
> digest_update(hash, from, (size_t)(p - from));
110c101
< calcsum(uint8_t *out, size_t size, uint8_t *mem, size_t cc, const uint8_t *hashed, size_t hashsize, int doarmor)
---
> calcsum(uint8_t *out, size_t size, const char *name, uint8_t *mem, size_t cc, const uint8_t *hashed, size_t hashsize, int doarmor)
118d108
< USE_ARG(size);
130,131c120,121
< digest_init(&hash, (const unsigned)hashalg);
< if (strchr("tw", doarmor) != NULL && !already_armored(mem, cc)) {
---
> digest_init(&hash, hashalg);
> if (doarmor && !already_armored(mem, cc)) {
133c123
< don_armor(&hash, mem, cc - 1, doarmor);
---
> don_armor(&hash, mem, cc - 1);
174c164
< ret = calcsum(data, size, mem, cc, hashed, hashsize, doarmor);
---
> ret = calcsum(data, size, name, mem, cc, hashed, hashsize, doarmor);
191c181
< return calcsum(data, size, mem, cc, hashed, hashsize, doarmor);
---
> return calcsum(data, size, "[memory]", mem, cc, hashed, hashsize, doarmor);