CryptoProviderFactory.CreateHashAlgorithm Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateHashAlgorithm(HashAlgorithmName) |
Creates a HashAlgorithm for a specific algorithm. |
CreateHashAlgorithm(String) |
Creates a HashAlgorithm for a specific algorithm. |
CreateHashAlgorithm(HashAlgorithmName)
Creates a HashAlgorithm for a specific algorithm.
public virtual System.Security.Cryptography.HashAlgorithm CreateHashAlgorithm (System.Security.Cryptography.HashAlgorithmName algorithm);
abstract member CreateHashAlgorithm : System.Security.Cryptography.HashAlgorithmName -> System.Security.Cryptography.HashAlgorithm
override this.CreateHashAlgorithm : System.Security.Cryptography.HashAlgorithmName -> System.Security.Cryptography.HashAlgorithm
Public Overridable Function CreateHashAlgorithm (algorithm As HashAlgorithmName) As HashAlgorithm
Parameters
- algorithm
- HashAlgorithmName
the name of the hash algorithm to create.
Returns
Exceptions
thrown if algorithm
is null or empty.
thrown if Create(String, Object[]) returns a type that is not assignable from HashAlgorithm.
thrown if algorithm
is not supported.
Remarks
When finished with the HashAlgorithm call ReleaseHashAlgorithm(HashAlgorithm).
If CustomCryptoProvider is set and IsSupportedAlgorithm(String, Object[]) returns true. Create(String, Object[]) is called to obtain the HashAlgorithm.
Applies to
CreateHashAlgorithm(String)
Creates a HashAlgorithm for a specific algorithm.
public virtual System.Security.Cryptography.HashAlgorithm CreateHashAlgorithm (string algorithm);
abstract member CreateHashAlgorithm : string -> System.Security.Cryptography.HashAlgorithm
override this.CreateHashAlgorithm : string -> System.Security.Cryptography.HashAlgorithm
Public Overridable Function CreateHashAlgorithm (algorithm As String) As HashAlgorithm
Parameters
- algorithm
- String
the name of the hash algorithm to create.
Returns
Exceptions
thrown if algorithm
is null or empty.
thrown if Create(String, Object[]) returns a type that is not assignable from HashAlgorithm.
thrown if algorithm
is not supported.
Remarks
When finished with the HashAlgorithm call ReleaseHashAlgorithm(HashAlgorithm).
If CustomCryptoProvider is set and IsSupportedAlgorithm(String, Object[]) returns true. Create(String, Object[]) is called to obtain the HashAlgorithm.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기