CryptoProviderFactory.CreateKeyedHashAlgorithm(Byte[], String) 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.
Returns a KeyedHashAlgorithm for a specific algorithm.
public virtual System.Security.Cryptography.KeyedHashAlgorithm CreateKeyedHashAlgorithm (byte[] keyBytes, string algorithm);
abstract member CreateKeyedHashAlgorithm : byte[] * string -> System.Security.Cryptography.KeyedHashAlgorithm
override this.CreateKeyedHashAlgorithm : byte[] * string -> System.Security.Cryptography.KeyedHashAlgorithm
Public Overridable Function CreateKeyedHashAlgorithm (keyBytes As Byte(), algorithm As String) As KeyedHashAlgorithm
Parameters
- keyBytes
- Byte[]
bytes to use to create the Keyed Hash.
- algorithm
- String
the name of the keyed 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 KeyedHashAlgorithm.
algorithm
is not supported.
Remarks
When finished with the KeyedHashAlgorithm call ReleaseHashAlgorithm(HashAlgorithm).
If CustomCryptoProvider is set and IsSupportedAlgorithm(String, Object[]) returns true. Create(String, Object[]) is called to obtain the KeyedHashAlgorithm.
Applies to
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour