clj-commons / digest Goto Github PK
View Code? Open in Web Editor NEWDigest algorithms (md5, sha1 ...) for Clojure
Digest algorithms (md5, sha1 ...) for Clojure
Hi! Thanks for writing this library!
I just upgraded my JVM version from java 1.8 to openjdk 11, and with that change the hashes generated by the digest/md5 function changed.
This creates a problem for me, as I use this library for generating hashes that are used to check uniqueness of images uploaded into a system. (by storing the generated hashed in a database)
Is this expected behaviour?
Thanks!
Hi!
It seems you are using the clojure logo in your tests. Sadly, said logo cannot be redistributed freely :(
https://grokbase.com/t/gg/clojure/153kzdtgk1/logo-licensing
https://groups.google.com/forum/#!topic/clojure/_o-sHr_YIwo
This mean that when I package this library in Debian, I need to repack your source code to remove it, and then replace the logo with something else.
I propose you use the Debian logo instead! It's under the GPLv3 and can be freely redistribued :) https://www.debian.org/logos/
If that works for you, I'd be happy to send a patch your way.
Cheers, and thanks for maintaining this library!
The single segment namespace digest
is causing us issues here. Would it be too much to ask for digest to use something like yourorg.digest
?
The digest library generates its API at load time.
Clj-kondo will discover digest API vars when comment
s are not being skipped via this little trick:
digest/src/clj_commons/digest.clj
Lines 104 to 108 in bec1e0e
This did not work for cljdoc linting with clj-kondo because it disables checking comment
s.
We could make digest even more clj-kondo friendly.
Move declare outside of comment block.
But this could get out of synch with digest API, I suppose.
Create a custom clj-kondo hook for digest.
But since the API depends on querying available security providers, we might have the same issue as with idea 1?
Instead of creating digest's API at load time, statically generate digest API source code.
Instead of generating digest API automatically, do it by hand.
I mean, do the available providers change with new versions of Java?
And if they do, should the digest API be automatically changing?
Probably not.
Without a deep understanding, idea 3 seems like a reasonable choice to me.
The API would be generated under a specific JVM (if that's important).
It is similar to idea 4 but perhaps a bit less prone to human error.
Thoughts?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.