@@ -59,24 +59,24 @@ function Hash(algorithm, options) {
59
59
60
60
util . inherits ( Hash , LazyTransform ) ;
61
61
62
- Hash . prototype . _transform = function ( chunk , encoding , callback ) {
62
+ Hash . prototype . _transform = function _transform ( chunk , encoding , callback ) {
63
63
this . _handle . update ( chunk , encoding ) ;
64
64
callback ( ) ;
65
65
} ;
66
66
67
- Hash . prototype . _flush = function ( callback ) {
67
+ Hash . prototype . _flush = function _flush ( callback ) {
68
68
this . push ( this . _handle . digest ( ) ) ;
69
69
callback ( ) ;
70
70
} ;
71
71
72
- Hash . prototype . update = function ( data , encoding ) {
72
+ Hash . prototype . update = function update ( data , encoding ) {
73
73
encoding = encoding || exports . DEFAULT_ENCODING ;
74
74
this . _handle . update ( data , encoding ) ;
75
75
return this ;
76
76
} ;
77
77
78
78
79
- Hash . prototype . digest = function ( outputEncoding ) {
79
+ Hash . prototype . digest = function digest ( outputEncoding ) {
80
80
outputEncoding = outputEncoding || exports . DEFAULT_ENCODING ;
81
81
// Explicit conversion for backward compatibility.
82
82
return this . _handle . digest ( `${ outputEncoding } ` ) ;
@@ -123,12 +123,12 @@ function Cipher(cipher, password, options) {
123
123
124
124
util . inherits ( Cipher , LazyTransform ) ;
125
125
126
- Cipher . prototype . _transform = function ( chunk , encoding , callback ) {
126
+ Cipher . prototype . _transform = function _transform ( chunk , encoding , callback ) {
127
127
this . push ( this . _handle . update ( chunk , encoding ) ) ;
128
128
callback ( ) ;
129
129
} ;
130
130
131
- Cipher . prototype . _flush = function ( callback ) {
131
+ Cipher . prototype . _flush = function _flush ( callback ) {
132
132
try {
133
133
this . push ( this . _handle . final ( ) ) ;
134
134
} catch ( e ) {
@@ -138,7 +138,7 @@ Cipher.prototype._flush = function(callback) {
138
138
callback ( ) ;
139
139
} ;
140
140
141
- Cipher . prototype . update = function ( data , inputEncoding , outputEncoding ) {
141
+ Cipher . prototype . update = function update ( data , inputEncoding , outputEncoding ) {
142
142
inputEncoding = inputEncoding || exports . DEFAULT_ENCODING ;
143
143
outputEncoding = outputEncoding || exports . DEFAULT_ENCODING ;
144
144
@@ -153,7 +153,7 @@ Cipher.prototype.update = function(data, inputEncoding, outputEncoding) {
153
153
} ;
154
154
155
155
156
- Cipher . prototype . final = function ( outputEncoding ) {
156
+ Cipher . prototype . final = function final ( outputEncoding ) {
157
157
outputEncoding = outputEncoding || exports . DEFAULT_ENCODING ;
158
158
var ret = this . _handle . final ( ) ;
159
159
@@ -166,22 +166,22 @@ Cipher.prototype.final = function(outputEncoding) {
166
166
} ;
167
167
168
168
169
- Cipher . prototype . setAutoPadding = function ( ap ) {
169
+ Cipher . prototype . setAutoPadding = function setAutoPadding ( ap ) {
170
170
this . _handle . setAutoPadding ( ap ) ;
171
171
return this ;
172
172
} ;
173
173
174
- Cipher . prototype . getAuthTag = function ( ) {
174
+ Cipher . prototype . getAuthTag = function getAuthTag ( ) {
175
175
return this . _handle . getAuthTag ( ) ;
176
176
} ;
177
177
178
178
179
- Cipher . prototype . setAuthTag = function ( tagbuf ) {
179
+ Cipher . prototype . setAuthTag = function setAuthTag ( tagbuf ) {
180
180
this . _handle . setAuthTag ( tagbuf ) ;
181
181
return this ;
182
182
} ;
183
183
184
- Cipher . prototype . setAAD = function ( aadbuf ) {
184
+ Cipher . prototype . setAAD = function setAAD ( aadbuf ) {
185
185
this . _handle . setAAD ( aadbuf ) ;
186
186
return this ;
187
187
} ;
@@ -270,14 +270,14 @@ function Sign(algorithm, options) {
270
270
271
271
util . inherits ( Sign , stream . Writable ) ;
272
272
273
- Sign . prototype . _write = function ( chunk , encoding , callback ) {
273
+ Sign . prototype . _write = function _write ( chunk , encoding , callback ) {
274
274
this . _handle . update ( chunk , encoding ) ;
275
275
callback ( ) ;
276
276
} ;
277
277
278
278
Sign . prototype . update = Hash . prototype . update ;
279
279
280
- Sign . prototype . sign = function ( options , encoding ) {
280
+ Sign . prototype . sign = function sign ( options , encoding ) {
281
281
if ( ! options )
282
282
throw new Error ( 'No key provided to sign' ) ;
283
283
@@ -309,7 +309,7 @@ util.inherits(Verify, stream.Writable);
309
309
Verify . prototype . _write = Sign . prototype . _write ;
310
310
Verify . prototype . update = Sign . prototype . update ;
311
311
312
- Verify . prototype . verify = function ( object , signature , sigEncoding ) {
312
+ Verify . prototype . verify = function verify ( object , signature , sigEncoding ) {
313
313
sigEncoding = sigEncoding || exports . DEFAULT_ENCODING ;
314
314
return this . _handle . verify ( toBuf ( object ) , toBuf ( signature , sigEncoding ) ) ;
315
315
} ;
@@ -477,14 +477,14 @@ function dhGetPrivateKey(encoding) {
477
477
}
478
478
479
479
480
- DiffieHellman . prototype . setPublicKey = function ( key , encoding ) {
480
+ DiffieHellman . prototype . setPublicKey = function setPublicKey ( key , encoding ) {
481
481
encoding = encoding || exports . DEFAULT_ENCODING ;
482
482
this . _handle . setPublicKey ( toBuf ( key , encoding ) ) ;
483
483
return this ;
484
484
} ;
485
485
486
486
487
- DiffieHellman . prototype . setPrivateKey = function ( key , encoding ) {
487
+ DiffieHellman . prototype . setPrivateKey = function setPrivateKey ( key , encoding ) {
488
488
encoding = encoding || exports . DEFAULT_ENCODING ;
489
489
this . _handle . setPrivateKey ( toBuf ( key , encoding ) ) ;
490
490
return this ;
@@ -602,19 +602,21 @@ function Certificate() {
602
602
}
603
603
604
604
605
- Certificate . prototype . verifySpkac = function ( object ) {
605
+ Certificate . prototype . verifySpkac = function verifySpkac ( object ) {
606
606
return binding . certVerifySpkac ( object ) ;
607
607
} ;
608
608
609
609
610
- Certificate . prototype . exportPublicKey = function ( object , encoding ) {
611
- return binding . certExportPublicKey ( toBuf ( object , encoding ) ) ;
612
- } ;
610
+ Certificate . prototype . exportPublicKey =
611
+ function exportPublicKey ( object , encoding ) {
612
+ return binding . certExportPublicKey ( toBuf ( object , encoding ) ) ;
613
+ } ;
613
614
614
615
615
- Certificate . prototype . exportChallenge = function ( object , encoding ) {
616
- return binding . certExportChallenge ( toBuf ( object , encoding ) ) ;
617
- } ;
616
+ Certificate . prototype . exportChallenge =
617
+ function exportChallenge ( object , encoding ) {
618
+ return binding . certExportChallenge ( toBuf ( object , encoding ) ) ;
619
+ } ;
618
620
619
621
620
622
exports . setEngine = function setEngine ( id , flags ) {
0 commit comments