mirror of
https://github.com/S2-/gitlit
synced 2025-08-04 05:10:05 +02:00
update dependencies
This commit is contained in:
7
node_modules/sshpk/lib/private-key.js
generated
vendored
7
node_modules/sshpk/lib/private-key.js
generated
vendored
@@ -3,6 +3,7 @@
|
||||
module.exports = PrivateKey;
|
||||
|
||||
var assert = require('assert-plus');
|
||||
var Buffer = require('safer-buffer').Buffer;
|
||||
var algs = require('./algs');
|
||||
var crypto = require('crypto');
|
||||
var Fingerprint = require('./fingerprint');
|
||||
@@ -97,7 +98,7 @@ PrivateKey.prototype.derive = function (newType) {
|
||||
priv = priv.slice(1);
|
||||
|
||||
pair = nacl.box.keyPair.fromSecretKey(new Uint8Array(priv));
|
||||
pub = new Buffer(pair.publicKey);
|
||||
pub = Buffer.from(pair.publicKey);
|
||||
|
||||
return (new PrivateKey({
|
||||
type: 'curve25519',
|
||||
@@ -115,7 +116,7 @@ PrivateKey.prototype.derive = function (newType) {
|
||||
priv = priv.slice(1);
|
||||
|
||||
pair = nacl.sign.keyPair.fromSeed(new Uint8Array(priv));
|
||||
pub = new Buffer(pair.publicKey);
|
||||
pub = Buffer.from(pair.publicKey);
|
||||
|
||||
return (new PrivateKey({
|
||||
type: 'ed25519',
|
||||
@@ -166,7 +167,7 @@ PrivateKey.prototype.createSign = function (hashAlgo) {
|
||||
v.sign = function () {
|
||||
var sig = oldSign(key);
|
||||
if (typeof (sig) === 'string')
|
||||
sig = new Buffer(sig, 'binary');
|
||||
sig = Buffer.from(sig, 'binary');
|
||||
sig = Signature.parse(sig, type, 'asn1');
|
||||
sig.hashAlgorithm = hashAlgo;
|
||||
sig.curve = curve;
|
||||
|
Reference in New Issue
Block a user