Add Crypto.Hash.shaxxx_bytes functions, taking Bytes as input #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tests all pass, including the examples for the new functions.
I want to avoid a full copy of the Bytes, but that can wait until another day. It will be a minor version bump, but a sizable change to the hashing code.
I was tempted to just export
Crypto.Hash.bytesDigest
and addCrypto.SHA.Alg
to the exported modules, but I chose to copy what's already there. I could be convinced otherwise.I'd also like to add functions to hash
File
contents. That will require the chunked mechanism and aTask
mechanism for fetching the bytes from the file. I won't do that unless somebody asks for it, or the idea nags me so much that I have to do it.Note that if you no longer wish to maintain this package, I'd be happy to take it over.
If this pull request doesn't get at least a comment within a week, I'll make
billstclair/elm-crypto
, based on my GitHub fork. I don't want to do that.