SslStream.CipherAlgorithm Propiedad

Definición

Obtiene un valor que identifica el algoritmo de cifrado masivo utilizado por esta secuencia SslStream.

public:
 virtual property System::Security::Authentication::CipherAlgorithmType CipherAlgorithm { System::Security::Authentication::CipherAlgorithmType get(); };
public virtual System.Security.Authentication.CipherAlgorithmType CipherAlgorithm { get; }
member this.CipherAlgorithm : System.Security.Authentication.CipherAlgorithmType
Public Overridable ReadOnly Property CipherAlgorithm As CipherAlgorithmType

Valor de propiedad

Valor que identifica el algoritmo de cifrado masivo usado por este SslStreamobjeto .

Excepciones

Se ha tenido acceso a la propiedad CipherAlgorithm antes de finalizar el proceso de autenticación o se ha producido un error de dicho proceso.

Ejemplos

En el ejemplo de código siguiente se muestra la configuración de criptografía de la secuencia especificada.

static void DisplaySecurityLevel( SslStream^ stream )
{
   Console::WriteLine( L"Cipher: {0} strength {1}", stream->CipherAlgorithm, stream->CipherStrength );
   Console::WriteLine( L"Hash: {0} strength {1}", stream->HashAlgorithm, stream->HashStrength );
   Console::WriteLine( L"Key exchange: {0} strength {1}", stream->KeyExchangeAlgorithm, stream->KeyExchangeStrength );
   Console::WriteLine( L"Protocol: {0}", stream->SslProtocol );
}
static void DisplaySecurityLevel(SslStream stream)
{
   Console.WriteLine("Cipher: {0} strength {1}", stream.CipherAlgorithm, stream.CipherStrength);
   Console.WriteLine("Hash: {0} strength {1}", stream.HashAlgorithm, stream.HashStrength);
   Console.WriteLine("Key exchange: {0} strength {1}", stream.KeyExchangeAlgorithm, stream.KeyExchangeStrength);
   Console.WriteLine("Protocol: {0}", stream.SslProtocol);
}
Private Shared Sub DisplaySecurityLevel(stream As SslStream)
    Console.WriteLine("Cipher: {0} strength {1}", stream.CipherAlgorithm, stream.CipherStrength)
    Console.WriteLine("Hash: {0} strength {1}", stream.HashAlgorithm, stream.HashStrength)
    Console.WriteLine("Key exchange: {0} strength {1}", stream.KeyExchangeAlgorithm, stream.KeyExchangeStrength)
    Console.WriteLine("Protocol: {0}", stream.SslProtocol)
End Sub

Comentarios

Se requiere un valor de Null para la CipherAlgorithm propiedad cuando se usa el NoEncryption valor de enumeración para construir una SslStream instancia.

Windows Server 2003 y Windows XP no admiten el Null valor. Por lo tanto, aunque el Null valor se use para construir la SslStream instancia, la EncryptionPolicy propiedad será None. El Null valor solo se devuelve en Windows Vista y versiones posteriores.

Se aplica a