You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HashifyNet/Core/HashFactory.cs
+89-26Lines changed: 89 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -274,13 +274,94 @@ private HashFactory()
274
274
}
275
275
276
276
/// <summary>
277
-
/// Retrieves all available hash algorithm types registered in the system.
277
+
/// Retrieves an array of hash function instances based on the specified hash function type.
278
278
/// </summary>
279
-
/// <remarks>The returned array contains the types of all registered hash algorithm implementations. If no
280
-
/// hash algorithms are registered, the method returns <see langword="null"/>.</remarks>
281
-
/// <returns>An array of <see cref="Type"/> objects representing the registered hash algorithm types, or <see
282
-
/// langword="null"/> if no hash algorithms are available.</returns>
283
-
publicType[]GetAllHashAlgorithms()
279
+
/// <param name="type">The type of hash functions to retrieve. This determines the set of hash algorithms to be instantiated.</param>
280
+
/// <param name="defaultConfigMap">An optional dictionary mapping hash function types to their corresponding configuration objects. If provided, the
281
+
/// configurations in this dictionary will be used to initialize the hash function instances. If a type is not present
282
+
/// in the dictionary, a default configuration will be used if available.</param>
283
+
/// <param name="ignoredFunctions">An optional array of hash function types to be ignored during instantiation. Any types present in this array (and any types derive from the types in this array) will be skipped.</param>
284
+
/// <returns>An array of <see cref="IHashFunctionBase"/> instances representing the hash functions for the specified type.</returns>
285
+
/// <exception cref="InvalidOperationException">Thrown if no hash algorithms are found for the specified <paramref name="type"/>.</exception>
/// Retrieves an array of hash algorithm types based on the specified hash function category.
332
+
/// </summary>
333
+
/// <remarks>The returned array may include both cryptographic and non-cryptographic hash algorithms if the
334
+
/// specified <paramref name="type"/> includes both categories.</remarks>
335
+
/// <param name="type">A bitwise combination of <see cref="HashFunctionType"/> values that specifies the category of hash functions to
336
+
/// retrieve. Use <see cref="HashFunctionType.Cryptographic"/> to include cryptographic hash algorithms, <see
337
+
/// cref="HashFunctionType.Noncryptographic"/> to include non-cryptographic hash algorithms, or both.</param>
338
+
/// <returns>An array of <see cref="Type"/> objects representing the hash algorithms that match the specified category. If no
339
+
/// algorithms match the specified category, an empty array is returned. If the given <paramref name="type"/> neither contains <seealso cref="HashFunctionType.Cryptographic"/> nor <seealso cref="HashFunctionType.Noncryptographic"/>, the return value will be <see langword="null"/>.</returns>
0 commit comments