fix: address PR review - type consistency and runtime safety

- crypto.ts: widen aesEncrypWithIV params to Uint8Array for consistency
  with other AES helpers (Copilot review comment #1)
- noise-handler.ts: replace unsafe `as Buffer` type assertions with
  Buffer.from() for proper runtime conversion (Copilot review comment #2)

https://claude.ai/code/session_01Ffc5YrPuqv8N9SwEuSM8mr
This commit is contained in:
Claude
2026-02-08 21:26:21 +00:00
parent 2c18b734ee
commit 85cfb6a642
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -123,9 +123,9 @@ export const makeNoiseHandler = ({
const mixIntoKey = (data: Uint8Array) => {
const [write, read] = localHKDF(data)
salt = write as Buffer
encKey = read as Buffer
decKey = read as Buffer
salt = Buffer.from(write)
encKey = Buffer.from(read)
decKey = Buffer.from(read)
counter = 0
}