javascript-securehash-rails 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/README.md +18 -16
- data/lib/javascript-securehash-rails/version.rb +1 -1
- metadata +1 -1
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -3,16 +3,13 @@ The *Javascript Secure Hash* functions collection is ready to require and use in
|
|
3
3
|
|
4
4
|
This Rails plugin is an easy way to use the most common secure hash algorithms on your *Javascript/CoffeScript* files whenever are required.
|
5
5
|
The following digest algorithms are available:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
## Javascript Secure Hash Author
|
14
|
-
The author of all these JS algorithms is Paul Johnston.
|
15
|
-
More about his work at [pajhome.org.uk](http://pajhome.org.uk/crypt/md5/index.html).
|
6
|
+
|
7
|
+
- [MD4 (Deprecated)](http://en.wikipedia.org/wiki/MD4)
|
8
|
+
- [MD5](http://en.wikipedia.org/wiki/MD5)
|
9
|
+
- [RIPEMD-160](http://en.wikipedia.org/wiki/RIPEMD)
|
10
|
+
- [SHA-1](http://en.wikipedia.org/wiki/SHA-1)
|
11
|
+
- [SHA-2(256)](http://en.wikipedia.org/wiki/SHA-2)
|
12
|
+
- [SHA-2(512)](http://en.wikipedia.org/wiki/SHA-2)
|
16
13
|
|
17
14
|
## Install me!
|
18
15
|
To install this *gem*
|
@@ -43,12 +40,13 @@ Or if your want only to attach an specific digest algorithm do as
|
|
43
40
|
//= require securehash/sha512
|
44
41
|
|
45
42
|
The available functions by it's algorithms are:
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
43
|
+
|
44
|
+
- **calcMD4("AMessage")** (for MD4)
|
45
|
+
- **hex_md5("AMessage")** (for MD5)
|
46
|
+
- **hex_rmd160("AMessage")** (for RIPEMD-160)
|
47
|
+
- **hex_sha1("AMessage")** (for SHA-1)
|
48
|
+
- **hex_sha256("AMessage")** (for SHA2 256 bits)
|
49
|
+
- **hex_sha512("AMessage")** (for SHA2 512 bits)
|
52
50
|
|
53
51
|
## Example
|
54
52
|
Digesting these strings
|
@@ -62,5 +60,9 @@ Will pop-up the following messages:
|
|
62
60
|
|
63
61
|
**160-bit hash -> 90d925d853c3d35cd54070bb75280fefad9de9e7**
|
64
62
|
|
63
|
+
# Thanks to
|
64
|
+
The author of these JS algorithms, Paul Johnston.
|
65
|
+
More about his work at [pajhome.org.uk](http://pajhome.org.uk/crypt/md5/index.html).
|
66
|
+
|
65
67
|
# License
|
66
68
|
This project uses [*MIT-LICENSE*](http://en.wikipedia.org/wiki/MIT_License).
|