mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-25 06:24:27 +08:00
crypto.createSecretKey and generateKey/generateKeySync for "hmac" and "aes" return SecretKeyObject values, native dyn handles over a copy of the key bytes. The type and symmetricKeySize getters, export() as a Buffer or a JWK, equals(), instanceof KeyObject, String(), JSON.stringify and util.inspect follow Node 24.22, as do the argument checks, their order and their errors. createHmac and hkdf/hkdfSync accept these keys. toCryptoKey() and KeyObject.from() need WebCrypto values and are refused with SC2020. Dyn handle ops gain a @@toStringTag that differs from the class name and a flag for views with no properties, which util.inspect prints at any depth. KeyObject method calls dispatch through dynInvoke.