PdfFileSecurity
סקירה כללית
PdfFileSecurity הוא שיעור ב Aspose.PDF FOSS עבור .NET. מורשת מ : IDisposable.
פקס כדי להקפיד, לפענח ולשנות את הסיסמאות בקבצים PDF.
שיעור זה מספק 31 שיטות לעבוד עם אובייקטים PdfFileSecurity בתוכניות .NET. שיטות זמינות כוללות: BindPdf, ChangePassword, ChangePasswords, Close, DecryptFile, Dispose, EncryptFile, PdfFileSecurity, Save, SetPrivilege, TryChangePassword, TryDecryptFile,2 שיטות נוספות. כל החברים הציבוריים זמינים לכל יישום .NET לאחר התקנת Aspose.PDF FOSS עבור חבילת .Net. רכוש : AllowExceptions, InputFile, InputStream, LastException, OutputFile, OutputStream.
נכסים
| שם | סוג | גישה | תיאור |
|---|---|---|---|
AllowExceptions | bool | קרא / כתיבה | כאשר אמיתי, פעולות מעמיקות להפיץ יוצאים מן הכלל; כאשר מזויף (המבחין), פעולת ניסיון* לתפוס את החסרון האחרון שזרק ב LastException ולהחזיר מזויף. |
LastException | Exception? | קראו | החלק האחרון נרשם על ידי שיטת Try* או null. |
InputFile | string | קרא / כתיבה | הגדר את מסלול הקובץ הכניסה המשמש על ידי פעולות ממושכות. |
InputStream | Stream | קרא / כתיבה | הגדר את זרימת הכניסה המשמשת על ידי פעולות ממושכות. |
OutputFile | string | קרא / כתיבה | העברת את ההצעה הבאה אל הקובץ הזה. |
OutputStream | Stream | קרא / כתיבה | נסע אל ההצלה הבאה לכיוון זה. |
שיטות
| חתימה | תיאור |
|---|---|
PdfFileSecurity() | ctor כברירת מחדל – עבור העומס המבוסס על ביט סטטי[]. |
PdfFileSecurity(document: Document) | להרוס מסמך קיימת; קורא מחזיק את חייו. |
PdfFileSecurity(path: string) | פתח את הקובץ בדרכים וקשר אותו. |
PdfFileSecurity(document: Document, outputStream: Stream) | להדביק מסמך ולשמור את הנתיב בהמשך ל- outputStream. |
PdfFileSecurity(document: Document, outputFile: string) | להדביק מסמך ולשמור את הנתיב בהמשך ל-outputFile. |
PdfFileSecurity(inputStream: Stream, outputStream: Stream) | מחבר מהזרם והציל אותו לתוך זרם. |
PdfFileSecurity(inputFile: string, outputFile: string) | קשור דרך אחת, והציל את הדרך. |
Dispose() | שיחות נוכח על זה PdfFileSecurity דוגמה. |
Close() | אליס על זמינות. |
BindPdf(srcFile: string) | לחבר לקובץ PDF ב srcFile. |
BindPdf(srcStream: Stream) | חיבור ל- PDF קריאה מ srcStream. |
BindPdf(document: Document) | מחויב למסמך קיימת; הקולר בבעלותו של חייו. |
Save(path: string) | שמור את המסמך המובטח לדרך קובץ. |
Save(stream: Stream) | שמור את המסמך המוגבל לתוך זרם. |
EncryptFile(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege, keySize: KeySize, cipher: Algorithm) | להסתיר את המסמך המובטח. |
EncryptFile(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege, keySize: KeySize) | הצפנה של המסמך המובטח בגרסה הבסיסית של AES. |
TryEncryptFile(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege, keySize: KeySize) | ניסיון שונה EncryptFile(string, string ,DocumentPrivilege , KeySize, אלגוריתם). |
SetPrivilege(privilege: DocumentPrivilege) | להגיש דגלים מועדפים על המסמך המובטח על ידי הצפנה מחדש עם סיסמאות ריקות והרשאות שניתנו. |
SetPrivilege(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege) | להגיש דגלים עם סיסמאות ברורות. |
TrySetPrivilege(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege) | ניסיון שונה SetPrivilege (string, string ,DocumentPrivilege). |
DecryptFile(ownerPassword: string) | להדפיס את המסמך המובטח באמצעות הסיסמה שניתנה. |
TryDecryptFile(ownerPassword: string) | ניסיון שונה מ DecryptFile (string). |
ChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string) | לשנות את הסיסמאות על המסמך המוגבל תוך שמירה על הפרטיות הקיימות והקריפטוגרפיה AES-128 . |
ChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize) | לשנות את הסיסמאות ואת היתרונות העליונים + גודל מפתח. |
ChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize, cipher: Algorithm) | לשנות את הסיסמאות ואת היתרונות של העברת + גודל מפתח + ציפר. |
TryChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string) | ניסיון שונה ChangePassword (string, string , strings). |
TryChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize) | חבילה 5 - מדרגות, מגרש, מסלולי תצוגה (מגרשי תזונה). |
TryChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize, cipher: Algorithm) | ניסיון שונה של 6 ארג ChangePassword (string, string , strings,DocumentPrivilege, KeySize , אלגוריתם). |
EncryptFile(input: byte[], userPassword: string, ownerPassword: string, permissions: DocumentPrivilege?, algorithm: CryptoAlgorithm) | הצפנת PDF עם הסיסמאות והאלגוריתם המפורט. |
DecryptFile(input: byte[], password: string) | להסיר הצפנה מתוך PDF באמצעות הסיסמה הנכונה. |
ChangePasswords(input: byte[], oldOwnerPassword: string, newUserPassword: string, newOwnerPassword: string, algorithm: CryptoAlgorithm) | לשנות את הסיסמאות ב- PDF מוצפן. |