MCPcopy Create free account
hub / github.com/allocnode/oh-my-sage / constructor

Method constructor

ref/gateway_client.js:21–28  ·  view source on GitHub ↗
(key, nonce)

Source from the content-addressed store, hash-verified

19// ==================== AES-GCM ====================
20class AESGCMCipher {
21 constructor(key, nonce) {
22 if (key.length !== 16) throw new Error('key must be 16 bytes');
23 if (nonce.length !== 8) throw new Error('nonce must be 8 bytes');
24 this.key = key;
25 this.nonce = nonce;
26 this.encryptCounter = 1;
27 this.decryptCounter = 0;
28 }
29
30 _makeIV(counter) {
31 const iv = Buffer.alloc(12);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected