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

Function skipFields

lib/protocol/keyParser.js:68–82  ·  view source on GitHub ↗
(buf, nfields)

Source from the content-addressed store, hash-verified

66}
67
68function skipFields(buf, nfields) {
69 const bufLen = buf.length;
70 let pos = (buf._pos || 0);
71 for (let i = 0; i < nfields; ++i) {
72 const left = (bufLen - pos);
73 if (pos >= bufLen || left < 4)
74 return false;
75 const len = readUInt32BE(buf, pos);
76 if (left < 4 + len)
77 return false;
78 pos += 4 + len;
79 }
80 buf._pos = pos;
81 return true;
82}
83
84function genOpenSSLRSAPub(n, e) {
85 const asnWriter = new Ber.Writer();

Callers 3

parseOpenSSHPrivKeysFunction · 0.85
keyParser.jsFile · 0.85
parseDERFunction · 0.85

Calls 1

readUInt32BEFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…