MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / aeadAdditionalData

Function aeadAdditionalData

modules/crypt/ssl/ssl_record.js:124–132  ·  view source on GitHub ↗
(seqNum, type, version, len)

Source from the content-addressed store, hash-verified

122 return hmac.close();
123 },
124 aeadAdditionalData(seqNum, type, version, len) {
125 const c = ArrayBuffer.fromBigInt(seqNum, 8);
126 let tmps = new SSLStream(undefined, c.byteLength + 1 + 2 + 2);
127 tmps.writeChunk(c);
128 tmps.writeChar(type);
129 tmps.writeChars(version, 2);
130 tmps.writeChars(len, 2);
131 return tmps.getChunk().buffer;
132 },
133 unpacketize(session, s) {
134 session.traceProtocol(this);
135 let type = s.readChar();

Callers

nothing calls this directly

Calls 5

writeChunkMethod · 0.95
writeCharMethod · 0.95
writeCharsMethod · 0.95
getChunkMethod · 0.95
fromBigIntMethod · 0.80

Tested by

no test coverage detected