-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Move Adler32 and CRC32 to Digest #8881
Move Adler32 and CRC32 to Digest #8881
Conversation
|
The files are still there. And digest is included with When the deprecated are effectively dropped, yes, the docs_main.cr should be updated. |
I agree on moving Adler32 and CRC32 under a combined namespace. But I'm not sure they fit under the We could still continue with this and accept there's some mismatch. |
I've found that many std-libs put CRC32 and Adler32 under Digest and none that uses another namespace ... |
golang uses the That said, I'm fine with digest |
Some digest algorithms are cryptographically strong but that's hardly a requirement, otherwise both MD5 (broken) and SHA-1 (weak) wouldn't be digest algorithms anymore, which would be nonsense. Don't use CRC32, Adler32, MD5 or SHA-1 for secure usages like verifying that a file wasn't tampered with. Use SHA-2, SHA-3 or BLAKE. But not all usages need to be secure (e.g. gzip, deflate). This is similar to random number generators: some are them are cryptographically strong. |
Sure we can say hash instead of digest, but the term would be confusing in Crystal ( |
Deprecate top-level versions
8709d61
to
540e992
Compare
I forgot to change the usages of them in the std-lib. |
540e992
to
f6763f8
Compare
i dont notice this change.but i dont' think is good idea to move A to B and move C to D 's breaking change like this. |
Adler32 and CRC32 interface are kept unmodified and hence they don't implement
Digest::Base
, but their results are 32-bit fixes intead of a slice/string; plus they support the combine alternative. I think the current API while simple is enough.The top-level versions are deprecated.