MCPcopy Create free account
hub / github.com/mscdex/ssh2 / sign

Method sign

test/test-userauth-agent.js:32–37  ·  view source on GitHub ↗
(pubKey, data, options, cb)

Source from the content-addressed store, hash-verified

30 cb(null, [ parseKey(clientKey.key.getPublicSSH()) ]);
31 }
32 sign(pubKey, data, options, cb) {
33 assert.strictEqual(++signCount, 1);
34 assert.strictEqual(pubKey.getPublicPEM(), clientKey.key.getPublicPEM());
35 const sig = clientKey.key.sign(data, options.hash);
36 cb(null, sig);
37 }
38 }
39
40 const username = 'Agent User';

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected