MCPcopy
hub / github.com/claude-code-best/claude-code / encryptAesEcb

Function encryptAesEcb

packages/weixin/src/media.ts:13–16  ·  view source on GitHub ↗
(plaintext: Buffer, key: Buffer)

Source from the content-addressed store, hash-verified

11import { UploadMediaType } from './types.js'
12
13export function encryptAesEcb(plaintext: Buffer, key: Buffer): Buffer {
14 const cipher = createCipheriv('aes-128-ecb', key, null)
15 return Buffer.concat([cipher.update(plaintext), cipher.final()])
16}
17
18export function decryptAesEcb(ciphertext: Buffer, key: Buffer): Buffer {
19 const decipher = createDecipheriv('aes-128-ecb', key, null)

Callers 2

uploadFileFunction · 0.85
media.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected