PdfFileSecurity

PdfFileSecurity

Overview

PdfFileSecurity là một lớp trong Aspose.PDF FOSS cho .NET. Dòng thừa kế từ: IDisposable.

  • Phân tích để mã hóa, giải mã và thay đổi mật khẩu trên các tệp PDF.

Khóa học này cung cấp 31 phương pháp để làm việc với các đối tượng PdfFileSecurity trong các chương trình .NET. Các phương pháp có sẵn bao gồm: BindPdf, ChangePassword, ChangePasswords, Close, DecryptFile, Dispose, EncryptFile, PdfFileSecurity, Save, SetPrivilege, TryChangePassword, TryDecryptFile,Và 2 phương pháp bổ sung. Tất cả các thành viên công cộng đều có thể truy cập bất kỳ ứng dụng .NET nào sau khi cài đặt Aspose.PDF FOSS cho gói .Net. Tài sản : AllowExceptions, InputFile, InputStream, LastException, OutputFile, OutputStream.

Properties

NameTypeAccessDescription
AllowExceptionsboolĐọc / viếtKhi thực tế, các hoạt động mạnh mẽ truyền tải ngoại lệ; khi giả (thay đổi mặc định), Các hoạt hình cố gắng* bắt được ngoại trừ cuối cùng ném trong LastException và trả lại giả.
LastExceptionException?ReadNgoại lệ cuối cùng được thu thập bằng phương pháp Try* hoặc null.
InputFilestringĐọc / viếtThiết lập con đường tệp nhập được sử dụng bởi các hoạt động mạnh mẽ.
InputStreamStreamĐọc / viếtThiết lập dòng nhập được sử dụng bởi các hoạt động mạnh mẽ.
OutputFilestringĐọc / viếtĐi vào phần sau Save đến file này.
OutputStreamStreamĐọc / viếtChuyển sang Save tiếp theo đến dòng này.

Methods

SignatureDescription
PdfFileSecurity()Ctor mặc định — cho các tải trên dựa trên byte[] static.
PdfFileSecurity(document: Document)Quay một tài liệu hiện có; người gọi sở hữu cuộc sống của nó.
PdfFileSecurity(path: string)Mở tệp trên đường và gắn nó.
PdfFileSecurity(document: Document, outputStream: Stream)Nhập một tài liệu và đường dẫn sau đó được lưu vào outputStream.
PdfFileSecurity(document: Document, outputFile: string)Nhập một tài liệu và đường dẫn sau đó được lưu vào outputFile.
PdfFileSecurity(inputStream: Stream, outputStream: Stream)Kết nối từ một dòng và tiết kiệm cho một stream.
PdfFileSecurity(inputFile: string, outputFile: string)Kết nối từ một con đường và cứu rỗi đến một đường.
Dispose()Calls Có sẵn trên trường hợp PdfFileSecurity này.
Close()Alias cho sẵn.
BindPdf(srcFile: string)Kết nối với một tệp PDF tại srcFile.
BindPdf(srcStream: Stream)Kết nối với PDF đọc từ srcStream.
BindPdf(document: Document)Kết nối với một tài liệu hiện có; người gọi sở hữu cuộc sống của mình.
Save(path: string)Lưu tài liệu được gắn kết đến một con đường tệp.
Save(stream: Stream)Lưu tài liệu được gắn kết với một dòng.
EncryptFile(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege, keySize: KeySize, cipher: Algorithm)Crypto tài liệu liên kết.
EncryptFile(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege, keySize: KeySize)Crypto the linked document defaulting cipher to AES. (cập nhật).
TryEncryptFile(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege, keySize: KeySize)Thử biến dạng EncryptFile (string, string ,DocumentPrivilege , KeySize, thuật toán).
SetPrivilege(privilege: DocumentPrivilege)Ứng dụng các cờ quyền vào tài liệu được gắn kết bằng cách mã hóa lại với mật khẩu trống và các giấy phép đã cung cấp.
SetPrivilege(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege)Ứng dụng các cờ đặc quyền với mật khẩu rõ ràng.
TrySetPrivilege(userPassword: string, ownerPassword: string, privilege: DocumentPrivilege)Thử biến dạng của SetPrivilege (string, string ,DocumentPrivilege).
DecryptFile(ownerPassword: string)Xóa tài liệu kết nối bằng mật khẩu đã được cung cấp.
TryDecryptFile(ownerPassword: string)Thử biến dạng của DecryptFile (string).
ChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string)Thay đổi mật khẩu trên tài liệu được gắn kết trong khi duy trì các đặc quyền hiện có và mã hóa AES-128 .
ChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize)Thay đổi mật khẩu và ưu tiên vượt trội + kích thước chìa khóa.
ChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize, cipher: Algorithm)Thay đổi mật khẩu và ưu tiên vượt trội + kích thước chìa khóa + chip.
TryChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string)Thử biến dạng của ChangePassword (string, string , strings).
TryChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize)Thử biến dạng của 5 arg ChangePassword (string, string , strings,DocumentPrivilege, KeySize).
TryChangePassword(ownerPassword: string, newUserPassword: string, newOwnerPassword: string, privilege: DocumentPrivilege, keySize: KeySize, cipher: Algorithm)Thử biến thể của 6 arg ChangePassword (string, string , strings,DocumentPrivilege, KeySize , thuật toán).
EncryptFile(input: byte[], userPassword: string, ownerPassword: string, permissions: DocumentPrivilege?, algorithm: CryptoAlgorithm)Crypto một PDF với mật khẩu và thuật toán cụ thể.
DecryptFile(input: byte[], password: string)Xóa mã hóa từ PDF bằng mật khẩu đúng.
ChangePasswords(input: byte[], oldOwnerPassword: string, newUserPassword: string, newOwnerPassword: string, algorithm: CryptoAlgorithm)Thay đổi mật khẩu trên một PDF mã hóa.

See Also

 Tiếng Việt