Crypto-js lib is not available anymore

守給你的承諾、 提交于 2019-12-12 18:47:54

问题


I have used following library for many years and now it is not available. http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js

Can someone help to find alternative?


回答1:


Download the library sources you need from here: https://code.google.com/archive/p/crypto-js/downloads

Then put them on your own server ... then replace http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js by /directory_where_you_put_the_download/rollups/md5.js

It works for me.




回答2:


It is still hosted on cdnjs, I found the working URLs for it See my answer How to generate an MD5 file hash in JavaScript?

the URLs to the individual js files such as md5.js have changed(and besides that , you need to load core.js first)

try <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/components/core.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js"></script> and see https://cdnjs.com/libraries/crypto-js for URLs

and you can use code such as e.g.

var hash = CryptoJS.MD5("Message");
console.log(hash);


来源:https://stackoverflow.com/questions/37187554/crypto-js-lib-is-not-available-anymore

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!