mirror of
https://github.com/S2-/gitlit
synced 2025-08-04 21:20:07 +02:00
update dependencies
This commit is contained in:
9
node_modules/sshpk/lib/ed-compat.js
generated
vendored
9
node_modules/sshpk/lib/ed-compat.js
generated
vendored
@@ -9,6 +9,7 @@ var nacl;
|
||||
var stream = require('stream');
|
||||
var util = require('util');
|
||||
var assert = require('assert-plus');
|
||||
var Buffer = require('safer-buffer').Buffer;
|
||||
var Signature = require('./signature');
|
||||
|
||||
function Verifier(key, hashAlgo) {
|
||||
@@ -33,7 +34,7 @@ Verifier.prototype._write = function (chunk, enc, cb) {
|
||||
|
||||
Verifier.prototype.update = function (chunk) {
|
||||
if (typeof (chunk) === 'string')
|
||||
chunk = new Buffer(chunk, 'binary');
|
||||
chunk = Buffer.from(chunk, 'binary');
|
||||
this.chunks.push(chunk);
|
||||
};
|
||||
|
||||
@@ -45,7 +46,7 @@ Verifier.prototype.verify = function (signature, fmt) {
|
||||
sig = signature.toBuffer('raw');
|
||||
|
||||
} else if (typeof (signature) === 'string') {
|
||||
sig = new Buffer(signature, 'base64');
|
||||
sig = Buffer.from(signature, 'base64');
|
||||
|
||||
} else if (Signature.isSignature(signature, [1, 0])) {
|
||||
throw (new Error('signature was created by too old ' +
|
||||
@@ -81,7 +82,7 @@ Signer.prototype._write = function (chunk, enc, cb) {
|
||||
|
||||
Signer.prototype.update = function (chunk) {
|
||||
if (typeof (chunk) === 'string')
|
||||
chunk = new Buffer(chunk, 'binary');
|
||||
chunk = Buffer.from(chunk, 'binary');
|
||||
this.chunks.push(chunk);
|
||||
};
|
||||
|
||||
@@ -90,7 +91,7 @@ Signer.prototype.sign = function () {
|
||||
new Uint8Array(Buffer.concat(this.chunks)),
|
||||
new Uint8Array(Buffer.concat([
|
||||
this.key.part.k.data, this.key.part.A.data])));
|
||||
var sigBuf = new Buffer(sig);
|
||||
var sigBuf = Buffer.from(sig);
|
||||
var sigObj = Signature.parse(sigBuf, 'ed25519', 'raw');
|
||||
sigObj.hashAlgorithm = 'sha512';
|
||||
return (sigObj);
|
||||
|
Reference in New Issue
Block a user