2
2
3
3
## Contents
4
4
5
- - [ Demo] ( #demo )
5
+ - [ Demo] ( https://blueimp.github.io/JavaScript-MD5/ )
6
6
- [ Description] ( #description )
7
7
- [ Usage] ( #usage )
8
8
- [ Client-side] ( #client-side )
12
12
- [ Tests] ( #tests )
13
13
- [ License] ( #license )
14
14
15
- ## Demo
16
-
17
- [ JavaScript MD5 Demo] ( https://blueimp.github.io/JavaScript-MD5/ )
18
-
19
15
## Description
20
16
21
- JavaScript MD5 implementation. Compatible with server-side environments like
22
- Node.js, module loaders like RequireJS, Browserify or webpack and all web
23
- browsers.
17
+ JavaScript [ MD5] ( https://en.wikipedia.org/wiki/MD5 ) implementation.
18
+ Compatible with server-side environments like [ Node.js] ( https://nodejs.org/ ) ,
19
+ module loaders like [ RequireJS] ( https://requirejs.org/ ) or
20
+ [ webpack] ( https://webpack.js.org/ ) and all web browsers.
24
21
25
22
## Usage
26
23
27
24
### Client-side
28
25
26
+ Install the ** blueimp-md5** package with [ NPM] ( https://www.npmjs.org/ ) :
27
+
28
+ ``` sh
29
+ npm install blueimp-md5
30
+ ```
31
+
29
32
Include the (minified) JavaScript [ MD5] ( https://en.wikipedia.org/wiki/MD5 )
30
33
script in your HTML markup:
31
34
@@ -45,10 +48,9 @@ var hash = md5('value') // "2063c1608d6e0baf80249c42e2be5804"
45
48
### Server-side
46
49
47
50
The following is an example how to use the JavaScript MD5 module on the
48
- server-side with [ Node.js] ( http ://nodejs.org/) .
51
+ server-side with [ Node.js] ( https ://nodejs.org/) .
49
52
50
- Create a new directory and add the ** md5.js** file. Or alternatively, install
51
- the ** blueimp-md5** package with [ npm] ( https://www.npmjs.org/ ) :
53
+ Install the ** blueimp-md5** package with [ NPM] ( https://www.npmjs.org/ ) :
52
54
53
55
``` sh
54
56
npm install blueimp-md5
@@ -58,7 +60,7 @@ Add a file **server.js** with the following content:
58
60
59
61
``` js
60
62
require (' http' )
61
- .createServer (function (req , res ) {
63
+ .createServer (function (req , res ) {
62
64
// The md5 module exports the md5() function:
63
65
var md5 = require (' ./md5' ),
64
66
// Use the following version if you installed the package with npm:
@@ -124,7 +126,7 @@ There are two different ways to run the tests:
124
126
- run ` npm test ` in the Terminal in the root path of the repository package.
125
127
126
128
The first one tests the browser integration, the second one the
127
- [ node .js] ( http ://nodejs.org/) integration.
129
+ [ Node .js] ( https ://nodejs.org/) integration.
128
130
129
131
## License
130
132
0 commit comments