rspec/rules/S4790/highlighting.adoc

21 lines
667 B
Plaintext
Raw Normal View History

=== Highlighting
* 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
For example:
[source,csharp]
----
byte[] hash = MD5.HashData(data);
^^^^^^^^^^^^^^^^^^
HashAlgorithm obj1 = new MD5CryptoServiceProvider();
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
HashAlgorithm obj2 = HashAlgorithm.Create("MD5");
^^^^^^^^^^^^^^^^^^^^^^^^^^^
----