Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComputeHash Async required #36068

mgardi85 opened this Issue Mar 15, 2019 · 1 comment


None yet
2 participants
Copy link

mgardi85 commented Mar 15, 2019

Currently "System.Security.Cryptography.HashAlgorithm" has Computehash with 3 overloads.
one of them takes Stream as an input and reads from the stream to compute the hash.

can we have an "ComputeHashAsync" to do this item as the reading from stream can be done async


This comment has been minimized.

Copy link

GrabYourPitchforks commented Mar 15, 2019

Seems reasonable. Thinking something like the below?

public class HashAlgorithm
    public virtual Task<byte[]> ComputeHashAsync(Stream inputStream, CancellationToken cancellationToken = default);

    // Do we also need the below method? There's no existing Stream-based overload.
    public virtual Task HashCoreAsync(Stream inputStream, CancellationToken cancellationToken = default);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.