1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 12:50:04 +02:00

update dependencies

This commit is contained in:
s2
2018-10-09 09:51:34 +02:00
parent 4fcc873901
commit da4083f574
1112 changed files with 23205 additions and 21697 deletions

9
node_modules/ecc-jsbn/index.js generated vendored
View File

@@ -1,6 +1,7 @@
var crypto = require("crypto");
var BigInteger = require("jsbn").BigInteger;
var ECPointFp = require("./lib/ec.js").ECPointFp;
var Buffer = require("safer-buffer").Buffer;
exports.ECCurves = require("./lib/sec.js");
// zero prepad
@@ -40,17 +41,17 @@ exports.ECKey = function(curve, key, isPublic)
if(this.P)
{
// var pubhex = unstupid(this.P.getX().toBigInteger().toString(16),bytes*2)+unstupid(this.P.getY().toBigInteger().toString(16),bytes*2);
// this.PublicKey = new Buffer("04"+pubhex,"hex");
this.PublicKey = new Buffer(c.getCurve().encodeCompressedPointHex(this.P),"hex");
// this.PublicKey = Buffer.from("04"+pubhex,"hex");
this.PublicKey = Buffer.from(c.getCurve().encodeCompressedPointHex(this.P),"hex");
}
if(priv)
{
this.PrivateKey = new Buffer(unstupid(priv.toString(16),bytes*2),"hex");
this.PrivateKey = Buffer.from(unstupid(priv.toString(16),bytes*2),"hex");
this.deriveSharedSecret = function(key)
{
if(!key || !key.P) return false;
var S = key.P.multiply(priv);
return new Buffer(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex");
return Buffer.from(unstupid(S.getX().toBigInteger().toString(16),bytes*2),"hex");
}
}
}