| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9ad611c commit 67e9e71
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -66,6 +66,16 @@ const privateDsa = fixtures.readKey('dsa_private_encrypted_1025.pem', | |||
| 66 | 66 | }); | |
| 67 | 67 | } | |
| 68 | 68 | ||
| 69 | + { | ||
| 70 | + assert.throws(() => KeyObject.from('invalid_key'), { | ||
| 71 | + name: 'TypeError', | ||
| 72 | + code: 'ERR_INVALID_ARG_TYPE', | ||
| 73 | + message: | ||
| 74 | + 'The "key" argument must be an instance of CryptoKey. Received type ' + | ||
| 75 | + "string ('invalid_key')" | ||
| 76 | + }); | ||
| 77 | + } | ||
| 78 | + | ||
| 69 | 79 | { | |
| 70 | 80 | const keybuf = randomBytes(32); | |
| 71 | 81 | const key = createSecretKey(keybuf); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments