Skip to content

Commit c622e1a

Browse files
committed
Fix comment, deprecate keymap
1 parent 9c1291b commit c622e1a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nodejs/ece.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ function unpad(data, last) {
338338
}
339339
} else {
340340
if (data[i] !== 1) {
341-
throw new Error('last record needs to start padding with a 2');
341+
throw new Error('record needs to start padding with a 1');
342342
}
343343
}
344344
return data.slice(0, i);
@@ -472,7 +472,8 @@ function writeHeader(header) {
472472
* If |params.key| is specified, that value is used as the key.
473473
*
474474
* If |params.keyid| is specified without |params.dh|, the keyid value is used
475-
* to lookup the |params.keymap| for a buffer containing the key.
475+
* to lookup the |params.keymap| for a buffer containing the key. This feature
476+
* is deprecated in favour of just including |params.key| or |params.privateKey|.
476477
*
477478
* For Diffie-Hellman (WebPush), |params.dh| includes the public key of the
478479
* receiver. |params.privateKey| is used to establish a shared secret. For

0 commit comments

Comments
 (0)