Comparing version 1.3.1 to 1.3.2
1.3.2 / 2015-05-08 | ||
================== | ||
* feat(crypto): add sha256 hash | ||
1.3.1 / 2015-04-09 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -60,2 +60,14 @@ /*! | ||
/** | ||
* sha256 hash | ||
* | ||
* @param {String|Buffer} s | ||
* @param {String} [format] output string format, could be 'hex' or 'base64'. default is 'hex'. | ||
* @return {String} sha256 hash string | ||
* @public | ||
*/ | ||
exports.sha256 = function sha1(s, format) { | ||
return exports.hash('sha256', s, format); | ||
}; | ||
/** | ||
* HMAC algorithm. | ||
@@ -62,0 +74,0 @@ * |
{ | ||
"name": "utility", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "A collection of useful utilities.", | ||
"main": "lib/utility.js", | ||
"files": [ | ||
"lib/" | ||
], | ||
"scripts": { | ||
@@ -19,9 +22,6 @@ "test": "mocha -R spec -t 5000 test/*.test.js", | ||
}, | ||
"files": [ | ||
"lib" | ||
], | ||
"devDependencies": { | ||
"autod": "*", | ||
"beautify-benchmark": "*", | ||
"benchmark": "*", | ||
"beautify-benchmark": "~0.2.4", | ||
"benchmark": "~1.0.0", | ||
"contributors": "*", | ||
@@ -32,5 +32,5 @@ "istanbul": "*", | ||
"mocha": "*", | ||
"moment": "~2.8.3", | ||
"moment": "~2.10.2", | ||
"optimized": "~1.2.0", | ||
"should": "~4.1.0" | ||
"should": "~6.0.1" | ||
}, | ||
@@ -44,3 +44,4 @@ "homepage": "https://github.com/node-modules/utility", | ||
"keywords": [ | ||
"utility", "util", "utils" | ||
"utility", "util", "utils", | ||
"sha256", "sha1", "hash", "hex" | ||
], | ||
@@ -47,0 +48,0 @@ "engines": { |
@@ -27,4 +27,2 @@ utility | ||
![logo](https://raw.github.com/node-modules/utility/master/logo.png) | ||
A collection of useful utilities. | ||
@@ -58,2 +56,5 @@ | ||
// sha256 hash | ||
utils.sha256('@Python发烧友'); // '80ddd84d1453c994af764bf558c4b96adaced9dd8d7d2194705fe58e1b3162df' | ||
// Object sha1 hash | ||
@@ -228,3 +229,2 @@ utils.sha1({foo: 'bar', bar: 'foo'}).should.equal(utils.sha1({bar: 'foo', foo: 'bar'})); | ||
Fastest is utils.datestruct().YYYYMMDD | ||
``` | ||
@@ -234,2 +234,2 @@ | ||
MIT | ||
[MIT](LICENSE.txt) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28540
636