PdfFileSecurity

PdfFileSecurity

خلاصه ای

PdfFileSecurity یک کلاس در Aspose.PDF FOSS برای .NET است. وارثان از: IDisposable.

نمای برای رمزگذاری، رمزگشایی و تغییر کلمات عبور در فایل های PDF.

این کلاس ۳۱ روش برای کار با اشیاء PdfFileSecurity در برنامه های .NET را فراهم می کند. روش های موجود شامل: BindPdf, ChangePassword, ChangePasswords, Close, DecryptFile, Dispose, EncryptFile, PdfFileSecurity, Save, SetPrivilege, TryChangePassword, TryDecryptFile,، و دو روش اضافی. همه اعضای عمومی پس از نصب بسته Aspose.PDF FOSS for .NET به هر برنامه .Net قابل دسترسی هستند. خواص: AllowExceptions, InputFile, InputStream, LastException, OutputFile, OutputStream.

خواص

نام:نوع:Accessشرح:
AllowExceptionsboolخواندن/نوشتنهنگامی که true، عملیات حالت پذیر استثنائات را پخش می کند؛ زمانی که false (پیش فرض) ، Try* عملیات آخرین استثنا در LastException را ضبط کرده و false را بازمی گرداند.
LastExceptionException?بخونید.آخرین استثنا که توسط روش Try* یا null ضبط شده است.
InputFilestringخواندن/نوشتنمسیر فایل ورودی که توسط عملیات حالت‌دار استفاده می‌شود را تنظیم کنید.
InputStreamStreamخواندن/نوشتنجریان ورودی مورد استفاده توسط عملیات حالت‌دار را تنظیم کنید.
OutputFilestringخواندن/نوشتنمسیر ذخیره بعدی را به این فایل منتقل کنید.
OutputStreamStreamخواندن/نوشتنمسیر بعدی را به این جریان بفرستید.

روش ها

Signatureشرح:
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, string) است.
TryChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize)گزینه آزمایشی از 5arg 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 کدگذاری شده عوض کنید.

همچنین ببینید:

 فارسی