[Pkg-javascript-commits] [node-sha.js] 02/31: use buffer module
Bastien Roucariès
rouca at moszumanska.debian.org
Thu Nov 30 11:23:25 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-sha.js.
commit 49a32f3e9ec3aa65a8a730038280061b33499414
Author: Astro <astro at spaceboyz.net>
Date: Tue Mar 7 11:59:19 2017 +0100
use buffer module
---
hash.js | 2 ++
package.json | 3 ++-
sha.js | 1 +
sha1.js | 1 +
sha224.js | 1 +
sha256.js | 1 +
sha384.js | 1 +
sha512.js | 1 +
8 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/hash.js b/hash.js
index 09579d2..9809aab 100644
--- a/hash.js
+++ b/hash.js
@@ -1,3 +1,5 @@
+var Buffer = require('buffer/').Buffer
+
// prototype class for hash functions
function Hash (blockSize, finalSize) {
this._block = new Buffer(blockSize)
diff --git a/package.json b/package.json
index 2837066..1160216 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,8 @@
"url": "git://github.com/crypto-browserify/sha.js.git"
},
"dependencies": {
- "inherits": "^2.0.1"
+ "inherits": "^2.0.1",
+ "buffer": "^2.3.4"
},
"devDependencies": {
"buffer": "~2.3.2",
diff --git a/sha.js b/sha.js
index 7cde1b0..36409c4 100644
--- a/sha.js
+++ b/sha.js
@@ -8,6 +8,7 @@
var inherits = require('inherits')
var Hash = require('./hash')
+var Buffer = require('buffer/').Buffer
var K = [
0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
diff --git a/sha1.js b/sha1.js
index 97f6b14..29d765d 100644
--- a/sha1.js
+++ b/sha1.js
@@ -9,6 +9,7 @@
var inherits = require('inherits')
var Hash = require('./hash')
+var Buffer = require('buffer/').Buffer
var K = [
0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
diff --git a/sha224.js b/sha224.js
index 31899ef..96287a2 100644
--- a/sha224.js
+++ b/sha224.js
@@ -9,6 +9,7 @@
var inherits = require('inherits')
var Sha256 = require('./sha256')
var Hash = require('./hash')
+var Buffer = require('buffer/').Buffer
var W = new Array(64)
diff --git a/sha256.js b/sha256.js
index 69b60fe..6a778a5 100644
--- a/sha256.js
+++ b/sha256.js
@@ -8,6 +8,7 @@
var inherits = require('inherits')
var Hash = require('./hash')
+var Buffer = require('buffer/').Buffer
var K = [
0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
diff --git a/sha384.js b/sha384.js
index dc48312..0b8cee8 100644
--- a/sha384.js
+++ b/sha384.js
@@ -1,6 +1,7 @@
var inherits = require('inherits')
var SHA512 = require('./sha512')
var Hash = require('./hash')
+var Buffer = require('buffer/').Buffer
var W = new Array(160)
diff --git a/sha512.js b/sha512.js
index 204a7b8..015df06 100644
--- a/sha512.js
+++ b/sha512.js
@@ -1,5 +1,6 @@
var inherits = require('inherits')
var Hash = require('./hash')
+var Buffer = require('buffer/').Buffer
var K = [
0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-sha.js.git
More information about the Pkg-javascript-commits
mailing list