SslStream.HashAlgorithm プロパティ

定義

メッセージ認証コード (MAC: Message Authentication Code) の生成に使用するアルゴリズムを取得します。Gets the algorithm used for generating message authentication codes (MACs).

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

プロパティ値

HashAlgorithmType

メッセージ認証コード (Mac) を生成するために使用されるアルゴリズム。The algorithm used for generating message authentication codes (MACs).

例外

認証プロセスの完了前に HashAlgorithm プロパティにアクセスしました。または、認証プロセスでエラーが発生しました。The HashAlgorithm property was accessed before the completion of the authentication process or the authentication process failed.

次のコード例では、指定されたストリームの暗号化設定を表示します。The following code example displays the cryptography settings for the specified stream.

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

注釈

メッセージ認証アルゴリズムは、改ざんと偽造を検出するために使用されるメッセージハッシュと署名を生成します。Message authentication algorithms generate message hashes and signatures used to detect tampering and forgery.

適用対象