Document.IsEncrypted
IsEncrypted(Stream, LoadOptions, out Document)
يتحقق مما إذا كان المستند من تدفق مشفرًا. للتحقق من ذلك نحتاج إلى تحميل المستند بالكامل. لذا قد يؤدي هذا الأسلوب إلى عقوبة في الأداء.
public static bool IsEncrypted(Stream stream, LoadOptions options, out Document document)
| معامل | نوع | الوصف |
|---|---|---|
| تدفق | Stream | التدفق. |
| خيارات | LoadOptions | خيارات التحميل. |
| document | Document& | المستند المحمل. |
قيمة الإرجاع
يرجع true إذا كان المستند مشفرًا وإلا false.
أمثلة
يعرض كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (!Document.IsEncrypted(fileName, out document))
{
Console.WriteLine("The document is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Provide a password.");
}
يوضح كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور محددة.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (Document.IsEncrypted(fileName, "VerySecretPassword", out document))
{
if (document != null)
{
Console.WriteLine("The document is decrypted. It is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Invalid password was provided.");
}
}
else
{
Console.WriteLine("The document is NOT encrypted. It is loaded and ready to be processed.");
}
انظر أيضًا
- class LoadOptions
- class Document
- namespace Aspose.Note
- assembly Aspose.Note
IsEncrypted(Stream, string, out Document)
يتحقق مما إذا كان المستند من تدفق مشفرًا. للتحقق من ذلك نحتاج إلى تحميل المستند بالكامل. لذا قد يؤدي هذا الأسلوب إلى عقوبة في الأداء.
public static bool IsEncrypted(Stream stream, string password, out Document document)
| معامل | نوع | الوصف |
|---|---|---|
| تدفق | Stream | التدفق. |
| password | String | كلمة المرور لفك تشفير مستند. |
| document | Document& | المستند المحمل. |
قيمة الإرجاع
يرجع true إذا كان المستند مشفرًا وإلا false.
أمثلة
يعرض كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (!Document.IsEncrypted(fileName, out document))
{
Console.WriteLine("The document is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Provide a password.");
}
يوضح كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور محددة.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (Document.IsEncrypted(fileName, "VerySecretPassword", out document))
{
if (document != null)
{
Console.WriteLine("The document is decrypted. It is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Invalid password was provided.");
}
}
else
{
Console.WriteLine("The document is NOT encrypted. It is loaded and ready to be processed.");
}
انظر أيضًا
- class Document
- namespace Aspose.Note
- assembly Aspose.Note
IsEncrypted(Stream, out Document)
يتحقق مما إذا كان المستند من تدفق مشفرًا. للتحقق من ذلك نحتاج إلى تحميل المستند بالكامل. لذا قد يؤدي هذا الأسلوب إلى عقوبة في الأداء.
public static bool IsEncrypted(Stream stream, out Document document)
| معامل | نوع | الوصف |
|---|---|---|
| تدفق | Stream | التدفق. |
| document | Document& | المستند المحمل. |
قيمة الإرجاع
يرجع true إذا كان المستند مشفرًا وإلا false.
أمثلة
يعرض كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (!Document.IsEncrypted(fileName, out document))
{
Console.WriteLine("The document is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Provide a password.");
}
يوضح كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور محددة.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (Document.IsEncrypted(fileName, "VerySecretPassword", out document))
{
if (document != null)
{
Console.WriteLine("The document is decrypted. It is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Invalid password was provided.");
}
}
else
{
Console.WriteLine("The document is NOT encrypted. It is loaded and ready to be processed.");
}
انظر أيضًا
- class Document
- namespace Aspose.Note
- assembly Aspose.Note
IsEncrypted(string, LoadOptions, out Document)
يتحقق مما إذا كان المستند من ملف مشفرًا. للتحقق من ذلك نحتاج إلى تحميل المستند بالكامل. لذا قد يؤدي هذا الأسلوب إلى عقوبة في الأداء.
public static bool IsEncrypted(string filePath, LoadOptions options, out Document document)
| معامل | نوع | الوصف |
|---|---|---|
| filePath | String | مسار الملف. |
| خيارات | LoadOptions | خيارات التحميل. |
| document | Document& | المستند المحمل. |
قيمة الإرجاع
يرجع true إذا كان المستند مشفرًا وإلا false.
أمثلة
يعرض كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (!Document.IsEncrypted(fileName, out document))
{
Console.WriteLine("The document is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Provide a password.");
}
يوضح كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور محددة.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (Document.IsEncrypted(fileName, "VerySecretPassword", out document))
{
if (document != null)
{
Console.WriteLine("The document is decrypted. It is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Invalid password was provided.");
}
}
else
{
Console.WriteLine("The document is NOT encrypted. It is loaded and ready to be processed.");
}
انظر أيضًا
- class LoadOptions
- class Document
- namespace Aspose.Note
- assembly Aspose.Note
IsEncrypted(string, out Document)
يتحقق مما إذا كان المستند من ملف مشفرًا. للتحقق من ذلك نحتاج إلى تحميل المستند بالكامل. لذا قد يؤدي هذا الأسلوب إلى عقوبة في الأداء.
public static bool IsEncrypted(string filePath, out Document document)
| معامل | نوع | الوصف |
|---|---|---|
| filePath | String | مسار الملف. |
| document | Document& | المستند المحمل. |
قيمة الإرجاع
يرجع true إذا كان المستند مشفرًا وإلا false.
أمثلة
يعرض كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (!Document.IsEncrypted(fileName, out document))
{
Console.WriteLine("The document is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Provide a password.");
}
يوضح كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور محددة.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (Document.IsEncrypted(fileName, "VerySecretPassword", out document))
{
if (document != null)
{
Console.WriteLine("The document is decrypted. It is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Invalid password was provided.");
}
}
else
{
Console.WriteLine("The document is NOT encrypted. It is loaded and ready to be processed.");
}
انظر أيضًا
- class Document
- namespace Aspose.Note
- assembly Aspose.Note
IsEncrypted(string, string, out Document)
يتحقق مما إذا كان المستند من ملف مشفرًا. للتحقق من ذلك نحتاج إلى تحميل المستند بالكامل. لذا قد يؤدي هذا الأسلوب إلى عقوبة في الأداء.
public static bool IsEncrypted(string filePath, string password, out Document document)
| معامل | نوع | الوصف |
|---|---|---|
| filePath | String | مسار الملف. |
| password | String | كلمة المرور لفك تشفير مستند. |
| document | Document& | المستند المحمل. |
قيمة الإرجاع
يرجع true إذا كان المستند مشفرًا وإلا false.
أمثلة
يعرض كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (!Document.IsEncrypted(fileName, out document))
{
Console.WriteLine("The document is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Provide a password.");
}
يوضح كيفية التحقق مما إذا كان المستند محميًا بكلمة مرور محددة.
// المسار إلى دليل المستندات.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string fileName = Path.Combine(dataDir, "Aspose.one");
Document document;
if (Document.IsEncrypted(fileName, "VerySecretPassword", out document))
{
if (document != null)
{
Console.WriteLine("The document is decrypted. It is loaded and ready to be processed.");
}
else
{
Console.WriteLine("The document is encrypted. Invalid password was provided.");
}
}
else
{
Console.WriteLine("The document is NOT encrypted. It is loaded and ready to be processed.");
}
انظر أيضًا
- class Document
- namespace Aspose.Note
- assembly Aspose.Note