none
Possible to determine System.Security.Cryptography.HashAlgorithm output size? RRS feed

  • Question

  • Hi,

    Suppose a hash-algorithm is created like this:

    using (var algorithm = Activator.CreateInstance(algorithmType) as HashAlgorithm)
    {
      /* Is it possible to know (before computing the hash) what size the output will be? */
    
    }              

    For example, I know that SHA256 is 256 bits => 32 bytes. But can I somehow read this from the abstract System.Security.Cryptography.HashAlgorithm class? That is, the size of what the output will be?

    --
    Werner


    Monday, June 24, 2013 8:51 AM

Answers

All replies