(hmac, seqNum, type, version, content)
| 108 | tlsCipherText: { |
| 109 | name: "tlsCipherText", |
| 110 | calculateMac(hmac, seqNum, type, version, content) { |
| 111 | hmac.reset(); |
| 112 | seqNum = ArrayBuffer.fromBigInt(seqNum); |
| 113 | let stream = new SSLStream(); |
| 114 | for (let len = 8 - seqNum.byteLength; len > 0; len--) |
| 115 | stream.writeChar(0); |
| 116 | stream.writeChunk(seqNum); |
| 117 | stream.writeChar(type); |
| 118 | stream.writeChars(version, 2); |
| 119 | stream.writeChars(content.byteLength, 2); |
| 120 | hmac.update(stream.getChunk()); |
| 121 | hmac.update(content); |
| 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); |
nothing calls this directly
no test coverage detected