https://toitlang.org/ logo
in TypeScript I have: ``` // 5. HKDF deri...
# general
z
in TypeScript I have:
Copy code
// 5. HKDF derivation
        const derivedKey = hkdf(
            sha256,
            hash2.slice(0, -1),  // IKM (excluding last byte)
            hash1,               // salt
            new Uint8Array(0),   // info
            16                   // length (128 bits)
        );
using the package
import { hkdf } from '@noble/hashes/hkdf';
https://github.com/paulmillr/noble-hashes/blob/main/src/hkdf.ts so this is the implementation in TS so its dependencies are HMAC and SHA-256. I could implement this directly in Toit, but I'm wondering if the mbedtls and the C API would be much more performant.