You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the createCipheriv function from node:crypto, deno panics when the key provided to the createCipheriv function with the aes-256-gcm algorithm is of type string (string provided for a key of type CipherKey, alias for BinaryLike/string).
This is reproducible in TypeScript via the following script:
When the key is provided as Buffer (const key: CipherKey = randomBytes(32);), Deno does not panic and createCipheriv functions normally.
Deno panic:
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.
Platform: linux x86_64
Version: 2.1.7
Args: ["deno", "run", "-A", "cypher.ts"]
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/generic-array-0.14.7/src/lib.rs:572:9:
assertion `left == right` failed
left: 64
right: 32
Version: Deno 2.1.7
When using the
createCipheriv
function fromnode:crypto
, deno panics when thekey
provided to thecreateCipheriv
function with theaes-256-gcm
algorithm is of type string (string provided for a key of type CipherKey, alias for BinaryLike/string).This is reproducible in TypeScript via the following script:
When the key is provided as Buffer (
const key: CipherKey = randomBytes(32);
), Deno does not panic andcreateCipheriv
functions normally.Deno panic:
Backtrace:
The text was updated successfully, but these errors were encountered: