summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2011-04-10 02:35:43 +0200
committerTor Andersson <tor.andersson@artifex.com>2011-04-10 03:29:04 +0200
commitb94dfb21d31dabda1095a66c809904ff934dd831 (patch)
treecc937f69fe3d7e8d5ab8973f3a71dd5e322c989d /apps
parentb83d1cfdd14cde26eb7d6ce3b741f9e35e5168a0 (diff)
downloadmupdf-b94dfb21d31dabda1095a66c809904ff934dd831.tar.xz
Make crypt struct opaque.
Diffstat (limited to 'apps')
-rw-r--r--apps/win_main.c12
1 files changed, 5 insertions, 7 deletions
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;