C#

C#

Made by DeepSource

Implementing custom crypto algorithms is not secure CS-S1005

Security
Critical
a02 cwe-200 cwe-319 owasp top 10

Certain classes in System.Security.Cryptography serve as the base for further implementation of crypto algorithms. However, it is recommended that you do not write your own implementation and use the standard and secure ones already available in .NET.

Bad Practice

class Algo : HashAlgorithm
{
    // ...
}

Recommended

using (var sha512 = SHA512.Create())
{
    // ...
}

Reference