Document.IsEncrypted
IsEncrypted(Stream, LoadOptions, out Document)
Verifica se un documento da uno stream è crittografato. Per verificarlo, dobbiamo caricare completamente questo documento. Quindi questo metodo può portare a una riduzione delle prestazioni.
public static bool IsEncrypted(Stream stream, LoadOptions options, out Document document)
| Parametro | Tipo | Descrizione | 
|---|---|---|
| stream | Stream | Il flusso. | 
| options | LoadOptions | Le opzioni di caricamento. | 
| document | Document& | Il documento caricato. | 
Valore di ritorno
Restituisce vero se il documento è cifrato altrimenti falso.
Esempi
Mostra come verificare se un documento è protetto da password.
// Il percorso della directory dei documenti.
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.");
}
Mostra come controllare se un documento è protetto da una password specifica.
// Il percorso della directory dei documenti.
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.");
}
Guarda anche
- class LoadOptions
- class Document
- spazio dei nomi Aspose.Note
- assemblea Aspose.Note
IsEncrypted(Stream, string, out Document)
Verifica se un documento da uno stream è crittografato. Per verificarlo, dobbiamo caricare completamente questo documento. Quindi questo metodo può portare a una riduzione delle prestazioni.
public static bool IsEncrypted(Stream stream, string password, out Document document)
| Parametro | Tipo | Descrizione | 
|---|---|---|
| stream | Stream | Il flusso. | 
| password | String | La password per decifrare un documento. | 
| document | Document& | Il documento caricato. | 
Valore di ritorno
Restituisce vero se il documento è cifrato altrimenti falso.
Esempi
Mostra come verificare se un documento è protetto da password.
// Il percorso della directory dei documenti.
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.");
}
Mostra come controllare se un documento è protetto da una password specifica.
// Il percorso della directory dei documenti.
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.");
}
Guarda anche
- class Document
- spazio dei nomi Aspose.Note
- assemblea Aspose.Note
IsEncrypted(Stream, out Document)
Verifica se un documento da uno stream è crittografato. Per verificarlo, dobbiamo caricare completamente questo documento. Quindi questo metodo può portare a una riduzione delle prestazioni.
public static bool IsEncrypted(Stream stream, out Document document)
| Parametro | Tipo | Descrizione | 
|---|---|---|
| stream | Stream | Il flusso. | 
| document | Document& | Il documento caricato. | 
Valore di ritorno
Restituisce vero se il documento è cifrato altrimenti falso.
Esempi
Mostra come verificare se un documento è protetto da password.
// Il percorso della directory dei documenti.
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.");
}
Mostra come controllare se un documento è protetto da una password specifica.
// Il percorso della directory dei documenti.
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.");
}
Guarda anche
- class Document
- spazio dei nomi Aspose.Note
- assemblea Aspose.Note
IsEncrypted(string, LoadOptions, out Document)
Controlla se un documento da un file è crittografato. Per verificarlo dobbiamo caricare completamente questo documento. Quindi questo metodo può portare a una riduzione delle prestazioni.
public static bool IsEncrypted(string filePath, LoadOptions options, out Document document)
| Parametro | Tipo | Descrizione | 
|---|---|---|
| filePath | String | Il percorso del file. | 
| options | LoadOptions | Le opzioni di caricamento. | 
| document | Document& | Il documento caricato. | 
Valore di ritorno
Restituisce vero se il documento è cifrato altrimenti falso.
Esempi
Mostra come verificare se un documento è protetto da password.
// Il percorso della directory dei documenti.
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.");
}
Mostra come controllare se un documento è protetto da una password specifica.
// Il percorso della directory dei documenti.
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.");
}
Guarda anche
- class LoadOptions
- class Document
- spazio dei nomi Aspose.Note
- assemblea Aspose.Note
IsEncrypted(string, out Document)
Controlla se un documento da un file è crittografato. Per verificarlo dobbiamo caricare completamente questo documento. Quindi questo metodo può portare a una riduzione delle prestazioni.
public static bool IsEncrypted(string filePath, out Document document)
| Parametro | Tipo | Descrizione | 
|---|---|---|
| filePath | String | Il percorso del file. | 
| document | Document& | Il documento caricato. | 
Valore di ritorno
Restituisce vero se il documento è cifrato altrimenti falso.
Esempi
Mostra come verificare se un documento è protetto da password.
// Il percorso della directory dei documenti.
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.");
}
Mostra come controllare se un documento è protetto da una password specifica.
// Il percorso della directory dei documenti.
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.");
}
Guarda anche
- class Document
- spazio dei nomi Aspose.Note
- assemblea Aspose.Note
IsEncrypted(string, string, out Document)
Controlla se un documento da un file è crittografato. Per verificarlo dobbiamo caricare completamente questo documento. Quindi questo metodo può portare a una riduzione delle prestazioni.
public static bool IsEncrypted(string filePath, string password, out Document document)
| Parametro | Tipo | Descrizione | 
|---|---|---|
| filePath | String | Il percorso del file. | 
| password | String | La password per decifrare un documento. | 
| document | Document& | Il documento caricato. | 
Valore di ritorno
Restituisce vero se il documento è cifrato altrimenti falso.
Esempi
Mostra come verificare se un documento è protetto da password.
// Il percorso della directory dei documenti.
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.");
}
Mostra come controllare se un documento è protetto da una password specifica.
// Il percorso della directory dei documenti.
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.");
}
Guarda anche
- class Document
- spazio dei nomi Aspose.Note
- assemblea Aspose.Note