Closed ferventcoder closed 7 years ago
How about switching from explicitly creating the various hash algorithm implementations to the HashAlgorithm.Create() method? You could pass configuration.HashType
directly to the method, gaining automatic support for all current and future hashes supported by .NET.
Already looking at doing that - evolutionary design. :)
@stefanscherer over here
@ferventcoder Thanks. Haven't done any C# yet and trying to "connect the dots". As it seems the suggestion with HashAlgorithm.Create()
seems the right way to do it.
Yep. The current solution here is a very YAGNI implementation. Adding in another type necessitates the need for refactoring. :)
@ferventcoder I've noticed some packages using sha256 now, is this already implemented?
Yes. Forgot to close this. Thanks for the reminder.