Giter VIP home page Giter VIP logo

digest's People

Contributors

bmabey avatar borkdude avatar daaku avatar daveyarwood avatar dergutemoritz avatar laurio avatar raxod502 avatar seancorfield avatar slipset avatar tebeka avatar vemv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

digest's Issues

Changing hashes when switching JVM version

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!

Please use a freely licensed logo instead of the clojure one in tests

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!

Consider making digest even more amenable to static analysis

Currently...

The digest library generates its API at load time.

Clj-kondo will discover digest API vars when comments are not being skipped via this little trick:

;;;; Hints for clj-kondo
(comment
(declare sha3-384 sha-256 sha3-256 sha-384 sha3-512 sha-1 sha-224 sha1 sha-512 md2 sha sha3-224 md5)
)

But...

This did not work for cljdoc linting with clj-kondo because it disables checking comments.

Perhaps...

We could make digest even more clj-kondo friendly.

Idea 1 - Move declare

Move declare outside of comment block.
But this could get out of synch with digest API, I suppose.

Idea 2 - Create a hook

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?

Idea 3 - Generate API source

Instead of creating digest's API at load time, statically generate digest API source code.

Idea 4 - Just hand-code it

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.

Proposal

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.