CipherAlgorithmType 열거형

정의

주의

KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.

SslStream 클래스에 사용할 수 있는 암호화 알고리즘을 정의합니다.

public enum class CipherAlgorithmType
public enum CipherAlgorithmType
[System.Obsolete("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public enum CipherAlgorithmType
type CipherAlgorithmType = 
[<System.Obsolete("KeyExchangeAlgorithm, KeyExchangeStrength, CipherAlgorithm, CipherStrength, HashAlgorithm and HashStrength properties of SslStream are obsolete. Use NegotiatedCipherSuite instead.", DiagnosticId="SYSLIB0058", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
type CipherAlgorithmType = 
Public Enum CipherAlgorithmType
상속
CipherAlgorithmType
특성

필드

Name Description
None 0

암호화 알고리즘은 사용되지 않습니다.

Null 24576

Null 암호화 알고리즘에는 암호화가 사용되지 않습니다.

Des 26113

DES(데이터 암호화 표준) 알고리즘입니다.

Rc2 26114

Rivest의 RC2(코드 2) 알고리즘입니다.

TripleDes 26115

3DES(Triple Data Encryption Standard) 알고리즘입니다.

Aes128 26126

128비트 키를 사용하는 AES(Advanced Encryption Standard) 알고리즘입니다.

Aes192 26127

192비트 키를 사용하는 AES(Advanced Encryption Standard) 알고리즘입니다.

Aes256 26128

256비트 키를 사용하는 AES(Advanced Encryption Standard) 알고리즘입니다.

Aes 26129

AES(Advanced Encryption Standard) 알고리즘입니다.

Rc4 26625

Rivest의 RC4(코드 4) 알고리즘입니다.

예제

다음 예제에서는 .의 속성을 표시합니다 SslStream.

static void AuthenticateCallback( IAsyncResult^ ar )
{
   SslStream^ stream = dynamic_cast<SslStream^>(ar->AsyncState);
   try
   {
      stream->EndAuthenticateAsClient( ar );
      Console::WriteLine( L"Authentication succeeded." );
      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 );
      
      // Encode a test message into a byte array.
      // Signal the end of the message using the "<EOF>".
      array<Byte>^message = Encoding::UTF8->GetBytes( L"Hello from the client.<EOF>" );
      
      // Asynchronously send a message to the server.
      stream->BeginWrite( message, 0, message->Length, gcnew AsyncCallback( WriteCallback ), stream );
   }
   catch ( Exception^ authenticationException ) 
   {
      e = authenticationException;
      complete = true;
      return;
   }

}
static void AuthenticateCallback(IAsyncResult ar)
{
    SslStream stream = (SslStream) ar.AsyncState;
    try
    {
        stream.EndAuthenticateAsClient(ar);
        Console.WriteLine("Authentication succeeded.");
        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);
        // Encode a test message into a byte array.
        // Signal the end of the message using the "<EOF>".
        byte[] message = Encoding.UTF8.GetBytes("Hello from the client.<EOF>");
        // Asynchronously send a message to the server.
        stream.BeginWrite(message, 0, message.Length,
            new AsyncCallback(WriteCallback),
            stream);
    }
    catch (Exception authenticationException)
    {
        e = authenticationException;
        complete = true;
        return;
    }
}

설명

이 열거형은 속성에 유효한 SslStream.CipherAlgorithm 값을 지정합니다.

적용 대상

추가 정보