X509Certificate.TryGetCertHash メソッド

定義

指定したハッシュ アルゴリズムを使用して、証明書のエンコードされた表現をハッシュすることで、証明書の "拇印" の生成を試みます。

public:
 virtual bool TryGetCertHash(System::Security::Cryptography::HashAlgorithmName hashAlgorithm, Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public virtual bool TryGetCertHash(System.Security.Cryptography.HashAlgorithmName hashAlgorithm, Span<byte> destination, out int bytesWritten);
abstract member TryGetCertHash : System.Security.Cryptography.HashAlgorithmName * Span<byte> * int -> bool
override this.TryGetCertHash : System.Security.Cryptography.HashAlgorithmName * Span<byte> * int -> bool
Public Overridable Function TryGetCertHash (hashAlgorithm As HashAlgorithmName, destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

パラメーター

hashAlgorithm
HashAlgorithmName

拇印に使用するアルゴリズム。

destination
Span<Byte>

証明書の拇印を受け取るバッファー。

bytesWritten
Int32

このメソッドから制御が戻るときに、 destinationに書き込まれた合計バイト数。 このパラメーターは、初期化されていないものとして扱われます。

返品

がハッシュ値を受け取るのに十分な長さである場合は 。それ以外の場合は。

例外

hashAlgorithm.Namenull または空の文字列です。

hashAlgorithm は既知のハッシュ アルゴリズムではありません。

適用対象

こちらもご覧ください