bitwiseshiftleft / sjcl

Stanford Javascript Crypto Library
http://bitwiseshiftleft.github.com/sjcl/
Other
7.18k stars 986 forks source link

All hashing functions other sha256 missing from sjcl.js #425

Open shawnlauzon opened 3 years ago

shawnlauzon commented 3 years ago

Looking at the documentation, I should be able to use hashing functions such as sjcl.hash.sha1. Unfortunately although I see the code in the repo, the minimized sjcl.js contains no reference to any hashing functions other than the default sha256.

image

From scjl documentation

I'm guessing since only the sha256 function is referenced in the code base, some tree shaking algorithm erroneously removed them during minimization. I was able to copy the sha1 function into my local codebase, but it would obviously be better to be fixed here.

Jytesh commented 3 years ago

Does git clone https://github.com/bitwiseshiftleft/sjcl.git && cd sjcl/ && ./configure --with-all && make work

igorrendulic commented 2 years ago

The command above works. Any news if updates on npmjs will be made?

Maybe I shall add my current solution how to add master branch to npm managed project:

package.json

"scripts": {
  "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test",
    "postinstall": "cd node_modules/sjcl && ./configure --with-all && make sjcl.js"
},
"dependencies": {
  "sjcl": "https://github.com/bitwiseshiftleft/sjcl/tarball/master",
...
},
"devDependencies": {
...
}