We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 404110a commit aee34b9Copy full SHA for aee34b9
1 file changed
test.js
@@ -5,4 +5,14 @@ describe('MD5', function () {
5
it('should return the expected MD5 hash for "message"', function () {
6
assert.equal('78e731027d8fd50ed642340b7c9a63b3', md5('message'));
7
});
8
+
9
+ it('should not return the same hash for random numbers twice', function () {
10
+ var msg1 = Math.floor((Math.random() * 100000) + 1) + (new Date).getTime();
11
+ var msg2 = Math.floor((Math.random() * 100000) + 1) + (new Date).getTime();
12
13
+ if (msg1 !== msg2)
14
+ assert.notEqual(md5(msg1), md5(msg2));
15
+ else
16
+ assert.equal(md5(msg1), md5(msg1));
17
+ });
18
0 commit comments