File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11'use strict' ;
2+ /*
3+ * Encrypted content coding
4+ *
5+ * === Note about versions ===
6+ *
7+ * This code supports multiple versions of the draft:
8+ *
9+ * aes128gcm: The most recent version, the salt, record size and key identifier
10+ * are included in a header that is part of the encrypted content coding. In
11+ * order to select this version, the |salt| parameter is omitted from calls
12+ * to encrypt() and decrypt(). A value for the salt is automatically
13+ * generated by this API when encrypting, which avoids errors.
14+ *
15+ * aesgcm: The version that is widely deployed with WebPush (as of 2016-10).
16+ * This version is selected by default if you provide a |salt| parameter and
17+ * either omit the |padSize| parameter, or set it to 2.
18+ *
19+ * aesgcm128: This version is old and will be removed in an upcoming release.
20+ * Select this version by providing |salt| and a |padSize| of 1.
21+ */
222
323var crypto = require ( 'crypto' ) ;
424var base64 = require ( 'urlsafe-base64' ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " http_ece" ,
3- "version" : " 0.5.2 " ,
3+ "version" : " 0.6.0 " ,
44 "description" : " Encrypted Content-Encoding for HTTP" ,
55 "homepage" : " https://github.com/martinthomson/encrypted-content-encoding" ,
66 "bugs" : " https://github.com/martinthomson/encrypted-content-encoding/issues" ,
You can’t perform that action at this time.
0 commit comments