Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Are ICryptoTransform.TransformBlock() and SHA256.ComputeHash() methods thread-safe?

$
0
0

Are ICryptoTransform.TransformBlock() and SHA256.ComputeHash() methods thread-safe?

I call System.Security.Cryptography.Aes.Create() to create an instance, then I call CreateEncryptor() / CreateDecryptor(). Can I useICryptoTransform.TransformBlock() method of these objects by multiple threads? Do I need mutual exclusive access? I see that creating of these objects is expensive.

The same question is about System.Security.Cryptography.SHA256.ComputeHash() method. Is it thread-safe?


Viewing all articles
Browse latest Browse all 8156

Trending Articles