diff --git a/src/js/node/crypto.ts b/src/js/node/crypto.ts index 7027ace99e3427..fd9d687758ec20 100644 --- a/src/js/node/crypto.ts +++ b/src/js/node/crypto.ts @@ -11832,8 +11832,9 @@ class KeyObject { } this.$bunNativePtr = key; } - toString() { - return "[object KeyObject]"; + + get [Symbol.toStringTag]() { + return "KeyObject" } static from(key) {