From b94dfb21d31dabda1095a66c809904ff934dd831 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 10 Apr 2011 02:35:43 +0200 Subject: Make crypt struct opaque. --- apps/win_main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'apps/win_main.c') diff --git a/apps/win_main.c b/apps/win_main.c index 5e513c89..0054ca17 100644 --- a/apps/win_main.c +++ b/apps/win_main.c @@ -171,17 +171,15 @@ dloginfoproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (xref->crypt) { - sprintf(buf, "Standard %d bit %s", xref->crypt->length, - xref->crypt->strf.method == PDF_CRYPT_AESV2 ? "AES" : "RC4"); - SetDlgItemTextA(hwnd, 0x12, buf); + SetDlgItemTextA(hwnd, 0x12, "Encrypted."); strcpy(buf, ""); - if (xref->crypt->p & (1 << 2)) + if (pdf_has_permission(xref, PDF_PERM_PRINT)) strcat(buf, "print, "); - if (xref->crypt->p & (1 << 3)) + if (pdf_has_permission(xref, PDF_PERM_CHANGE)) strcat(buf, "modify, "); - if (xref->crypt->p & (1 << 4)) + if (pdf_has_permission(xref, PDF_PERM_COPY)) strcat(buf, "copy, "); - if (xref->crypt->p & (1 << 5)) + if (pdf_has_permission(xref, PDF_PERM_NOTES)) strcat(buf, "annotate, "); if (strlen(buf) > 2) buf[strlen(buf)-2] = 0; -- cgit v1.2.3