2021-09-20 15:38:42 +02:00
|
|
|
=== Highlighting
|
|
|
|
|
2023-08-03 16:06:34 +02:00
|
|
|
* When a hash is calculated using a single function call:
|
|
|
|
** The hashing function call
|
|
|
|
* When an object representing a weak hash function...
|
|
|
|
** ... is constructed:
|
|
|
|
*** The object construction statement
|
|
|
|
** ... is returned from a factory method provided by a supported framework/library:
|
|
|
|
*** The factory method call that returns the object
|
2021-09-20 15:38:42 +02:00
|
|
|
|
2023-08-03 16:06:34 +02:00
|
|
|
For example:
|
|
|
|
[source,csharp]
|
|
|
|
----
|
|
|
|
byte[] hash = MD5.HashData(data);
|
|
|
|
^^^^^^^^^^^^^^^^^^
|
|
|
|
HashAlgorithm obj1 = new MD5CryptoServiceProvider();
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
HashAlgorithm obj2 = HashAlgorithm.Create("MD5");
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
----
|