@@ -80,7 +80,7 @@ function encryptOld(userPublicKey, payload) {
80
80
} ;
81
81
}
82
82
83
- // Intermediate standard, Firefox 46-47 .
83
+ // Intermediate standard, Firefox 46.
84
84
function encryptIntermediate ( userPublicKey , userAuth , payload ) {
85
85
var localCurve = crypto . createECDH ( 'prime256v1' ) ;
86
86
var localPublicKey = localCurve . generateKeys ( ) ;
@@ -104,7 +104,7 @@ function encryptIntermediate(userPublicKey, userAuth, payload) {
104
104
} ;
105
105
}
106
106
107
- // New standard, Firefox 48 + and Chrome 50+.
107
+ // New standard, Firefox 47 + and Chrome 50+.
108
108
function encrypt ( userPublicKey , userAuth , payload ) {
109
109
var localCurve = crypto . createECDH ( 'prime256v1' ) ;
110
110
var localPublicKey = localCurve . generateKeys ( ) ;
@@ -171,11 +171,11 @@ function sendNotification(endpoint, params) {
171
171
172
172
var userAuthBuf = urlBase64 . decode ( userAuth ) ;
173
173
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+).
175
175
encrypted = encrypt ( userPublicKey , userAuth , new Buffer ( payload ) ) ;
176
176
encodingHeader = 'aesgcm' ;
177
177
} 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).
179
179
encrypted = encryptIntermediate ( userPublicKey , userAuth , new Buffer ( payload ) ) ;
180
180
encodingHeader = 'aesgcm128' ;
181
181
}
0 commit comments