Skip to content

Commit b057976

Browse files
committed
Support Firefox 46-47 intermediate standard
1 parent 8b88ea8 commit b057976

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

nodejs/ece.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,13 @@ function deriveKeyAndNonce(params, mode) {
142142
var keyInfo;
143143
var nonceInfo;
144144
if (padSize === 1) {
145-
keyInfo = 'Content-Encoding: aesgcm128';
146-
nonceInfo = 'Content-Encoding: nonce';
145+
if (params.authSecret) {
146+
keyInfo = info('aesgcm128', s.context);
147+
nonceInfo = info('nonce', s.context);
148+
} else {
149+
keyInfo = 'Content-Encoding: aesgcm128';
150+
nonceInfo = 'Content-Encoding: nonce';
151+
}
147152
} else if (padSize === 2) {
148153
keyInfo = info('aesgcm', s.context);
149154
nonceInfo = info('nonce', s.context);

0 commit comments

Comments
 (0)