Comments (4)
It looks like in its current state md5(12345)
and md5('12345')
will still return different results. I am wondering if this is due to the fact that Strings get converted into byte arrays and integers are not. What is the expected outcome?
from node-md5.
In its current state the algorithm expects strings or byte arrays as messages (see line 11). I should have noted that in the Readme.
Nevertheless, I should simply fix that behavior by adding a toString()
for other values than string and byte array.
from node-md5.
Calling md5 with something different than strings or buffers is undefined behaviour.
Tobias Haar [email protected] schrieb:
It looks like in it's current state
md5(12345)
andmd5('12345')
will still return different results. I am wondering if this is due to the fact that Strings get converted into byte arrays and integers are not. What is the expected outcome?
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#3 (comment)
from node-md5.
the result of md5(12345) and md5('12345') should be same, i don't understand why not now; if the message is not strings or buffers, it should be converted to string at first, and then return the md5 value
from node-md5.
Related Issues (20)
- dist folder not contained in npm package HOT 1
- If an Array of non-integers is mistakenly passed in, do not silently hash [0] HOT 3
- Passing url object gives unexpected results HOT 3
- when I installed with npm, `let` is used in md5.js. HOT 3
- md5 of blob HOT 2
- Incorrect result for ArrayBuffer HOT 7
- NPM module not in sync with git repo HOT 2
- docs for options HOT 2
- Is ES6 import possible? HOT 4
- When using MD5 to encrypt numbers, the results are inconsistent HOT 7
- Error: Illegal argument undefined at module.exports HOT 1
- get wrong answer for md5 encryption HOT 3
- How do you output the 16 length MD5 values? HOT 1
- Why should dist/md5.min.js be made uppercase?
- how to use it with new import syntax? HOT 4
- How to reverse hashed MD5 HOT 1
- Error 403 HOT 1
- Slow performance on large video files
- hashed value coming differntly
- Different results between int and String HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-md5.