مشاركة عبر


DocumentBase.PasswordEncryptionKeyLength الخاصية

يحصل على الطول المفتاح خوارزمية يستخدم الكلمة Microsoft المكتب عند تشفير مستندات باستخدام كلمات المرور.

مساحة الاسم:  Microsoft.Office.Tools.Word
التجميع:  Microsoft.Office.Tools.Word.v4.0.Utilities (في Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

بناء الجملة

'إقرار
Public ReadOnly Property PasswordEncryptionKeyLength As Integer
    Get
public int PasswordEncryptionKeyLength { get; }

قيمة الخاصية

النوع: System.Int32
الطول المفتاح خوارزمية يستخدم الكلمة Microsoft المكتب عند تشفير مستندات باستخدام كلمات المرور.

ملاحظات

استخدام SetPasswordEncryptionOptionsأسلوب إلى تحديد الطول المفتاح الذي يستخدمه الكلمة عند تشفير مستندات باستخدام كلمات المرور.

أمثلة

مثال التعليمة البرمجية التالية تعيين كلمة المرور خيارات التشفير إذا كان المفتاح تشفير كلمة المرور الطول هو أصغر من من 40. إلى لاستخدام هذا المثال، قم بتشغيلها من ThisDocumentالفئة في مشروع المستوى مستند.

Private Sub DocumentPasswordEncryptionKeyLength()
    If Me.PasswordEncryptionKeyLength < 40 Then
        Dim PasswordEncryptionProvider As String = _
            "Microsoft RSA SChannel Cryptographic Provider"
        Dim PasswordEncryptionAlgorithm As String = "RC4"
        Dim PasswordEncryptionKeyLength As Integer = 56
        Dim PasswordEncryptionFileProperties As Object = True

        Me.SetPasswordEncryptionOptions(PasswordEncryptionProvider, _
            PasswordEncryptionAlgorithm, PasswordEncryptionKeyLength, _
            PasswordEncryptionFileProperties)
    End If
End Sub 
private void DocumentPasswordEncryptionKeyLength()
{
    if (this.PasswordEncryptionKeyLength < 40)
    {
        string PasswordEncryptionProvider = "Microsoft RSA SChannel Cryptographic Provider";
        string PasswordEncryptionAlgorithm = "RC4";
        int PasswordEncryptionKeyLength = 56;
        object PasswordEncryptionFileProperties = true;

        this.SetPasswordEncryptionOptions(PasswordEncryptionProvider,
            PasswordEncryptionAlgorithm, PasswordEncryptionKeyLength,
            ref PasswordEncryptionFileProperties);
    }
}

أمن NET Framework.

راجع أيضًَا

المرجع

DocumentBase الفئة

DocumentBase الأعضاء

Microsoft.Office.Tools.Word مساحة الاسم