MCPcopy
hub / github.com/gchq/CyberChef / parseCipherSuites

Function parseCipherSuites

src/core/lib/TLS.mjs:275–289  ·  view source on GitHub ↗

* Parse Cipher Suites * @param {Uint8Array} bytes * @returns {JSON}

(bytes)

Source from the content-addressed store, hash-verified

273 * @returns {JSON}
274 */
275function parseCipherSuites(bytes) {
276 const s = new Stream(bytes);
277 const b = s.clone();
278 const cs = [];
279
280 while (s.hasMore()) {
281 cs.push({
282 description: "Cipher Suite",
283 length: 2,
284 data: b.getBytes(2),
285 value: CIPHER_SUITES_LOOKUP[s.readInt(2)] || "Unknown"
286 });
287 }
288 return cs;
289}
290
291/**
292 * Parse Compression Methods

Callers 1

parseClientHelloFunction · 0.85

Calls 4

cloneMethod · 0.95
hasMoreMethod · 0.95
readIntMethod · 0.95
getBytesMethod · 0.80

Tested by

no test coverage detected