|
THotPDF.UserPassword
|
傳回頂部 上一頁 下一頁 |
|
Determines document user password
Delphi 語法: property UserPassword: AnsiString;
C++ 語法: __property AnsiString UserPassword;
說明 使用正確 user password 開啟檔案(或開啟沒有 user password 的檔案)後,可依 document encryption dictionary 中指定的 user access permissions 執行其他 operations
若使用者嘗試開啟具有 user password 的 encrypted document,viewer application 應提示輸入 password。正確提供任一 password 都可讓使用者開啟檔案並在螢幕上顯示。若檔案沒有 user password,則不會要求 password
AES-256 加密(revision 5 或 6)下,密碼按 UTF-8 解讀,且只取前 127 個位元組,這是 ISO 32000-2 的定義。HotPDF 會把 AnsiString 自其 code page(通常是系統 code page)轉換,因此含非 ASCII 字母的密碼在任何符合標準的閱讀器中都能開啟檔案。把 Unicode 字串指派給這個 AnsiString 屬性時,code page 無法表示的字母會遺失。RC4 與 AES-128 則直接使用密碼的原始位元組
Code Example
請參閱: ActivateProtection, CryptKeyLength, OwnerPassword, ProtectOptions |