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 for .Net. خصائص: AllowExceptions, InputFile, InputStream, LastException, OutputFile, OutputStream.
خصائص
| اسم | النوع | الوصول | وصف |
|---|---|---|---|
AllowExceptions | bool | القراءة/ الكتابة | عندما تكون true، تقوم العمليات ذات الحالة بنشر الاستثناءات؛ عند كذب (الجهل) ، تستحوذ عمليات Try* على آخر استثناء رمي في LastException وتعود false. |
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,strings,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, string). |
TryChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize) | اختبار-متغير من 5-arg ChangePassword ((string, string, string،DocumentPrivilege ،KeySize). |
TryChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize, cipher: Algorithm) | الاختلافات المحاولة من 6-arg ChangePassword ((string, string, string،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 مشفر. |