File tree Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Expand file tree Collapse file tree 2 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -182,13 +182,25 @@ function nbv(i) {
182182// (protected) set from string and radix
183183function bnpFromString ( data , radix , unsigned ) {
184184 var k ;
185- switch ( radix ) {
186- case 2 : k = 1 ; break ;
187- case 4 : k = 2 ; break ;
188- case 8 : k = 3 ; break ;
189- case 16 : k = 4 ; break ;
190- case 32 : k = 5 ; break ;
191- case 256 : k = 8 ; break ;
185+ switch ( radix ) {
186+ case 2 :
187+ k = 1 ;
188+ break ;
189+ case 4 :
190+ k = 2 ;
191+ break ;
192+ case 8 :
193+ k = 3 ;
194+ break ;
195+ case 16 :
196+ k = 4 ;
197+ break ;
198+ case 32 :
199+ k = 5 ;
200+ break ;
201+ case 256 :
202+ k = 8 ;
203+ break ;
192204 default :
193205 this . fromRadix ( data , radix ) ;
194206 return ;
@@ -839,13 +851,13 @@ function bnToBuffer(trimOrSize) {
839851}
840852
841853function bnEquals ( a ) {
842- return ( this . compareTo ( a ) == 0 ) ;
854+ return ( this . compareTo ( a ) == 0 ) ;
843855}
844856function bnMin ( a ) {
845- return ( this . compareTo ( a ) < 0 ) ? this : a ;
857+ return ( this . compareTo ( a ) < 0 ) ? this : a ;
846858}
847859function bnMax ( a ) {
848- return ( this . compareTo ( a ) > 0 ) ? this : a ;
860+ return ( this . compareTo ( a ) > 0 ) ? this : a ;
849861}
850862
851863//(protected) r = this op a (bitwise)
@@ -981,8 +993,8 @@ function bnBitCount() {
981993//(public) true iff nth bit is set
982994function bnTestBit ( n ) {
983995 var j = Math . floor ( n / this . DB ) ;
984- if ( j >= this . t ) return ( this . s != 0 ) ;
985- return ( ( this [ j ] & ( 1 << ( n % this . DB ) ) ) != 0 ) ;
996+ if ( j >= this . t ) return ( this . s != 0 ) ;
997+ return ( ( this [ j ] & ( 1 << ( n % this . DB ) ) ) != 0 ) ;
986998}
987999
9881000//(protected) this op (1<<n)
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ module.exports.makeScheme = function (key, options) {
7676 var hash = this . options . encryptionSchemeOptions . hash || DEFAULT_HASH_FUNCTION ;
7777 var mgf = this . options . encryptionSchemeOptions . mgf || module . exports . eme_oaep_mgf1 ;
7878 var label = this . options . encryptionSchemeOptions . label || new Buffer ( 0 ) ;
79- var emLen = this . key . encryptedDataLength ;
79+ var emLen = this . key . encryptedDataLength ;
8080
8181 var hLen = module . exports . digestLength [ hash ] ;
8282
You can’t perform that action at this time.
0 commit comments