Skip to content

Commit f686c6b

Browse files
committed
Update comments now that the new standard has been uplifted to Firefox 47
1 parent a987570 commit f686c6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function encryptOld(userPublicKey, payload) {
8080
};
8181
}
8282

83-
// Intermediate standard, Firefox 46-47.
83+
// Intermediate standard, Firefox 46.
8484
function encryptIntermediate(userPublicKey, userAuth, payload) {
8585
var localCurve = crypto.createECDH('prime256v1');
8686
var localPublicKey = localCurve.generateKeys();
@@ -104,7 +104,7 @@ function encryptIntermediate(userPublicKey, userAuth, payload) {
104104
};
105105
}
106106

107-
// New standard, Firefox 48+ and Chrome 50+.
107+
// New standard, Firefox 47+ and Chrome 50+.
108108
function encrypt(userPublicKey, userAuth, payload) {
109109
var localCurve = crypto.createECDH('prime256v1');
110110
var localPublicKey = localCurve.generateKeys();
@@ -171,11 +171,11 @@ function sendNotification(endpoint, params) {
171171

172172
var userAuthBuf = urlBase64.decode(userAuth);
173173
if (userAuthBuf.length === 16) {
174-
// Use the new standard if userAuth is defined and is 16 bytes long (Firefox 48+ and Chrome 50+).
174+
// Use the new standard if userAuth is defined and is 16 bytes long (Firefox 47+ and Chrome 50+).
175175
encrypted = encrypt(userPublicKey, userAuth, new Buffer(payload));
176176
encodingHeader = 'aesgcm';
177177
} else {
178-
// Use the intermediate standard if userAuth is defined and is 12 bytes long (Firefox 46-47).
178+
// Use the intermediate standard if userAuth is defined and is 12 bytes long (Firefox 46).
179179
encrypted = encryptIntermediate(userPublicKey, userAuth, new Buffer(payload));
180180
encodingHeader = 'aesgcm128';
181181
}

0 commit comments

Comments
 (0)