File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -1256,9 +1256,7 @@ static final function ToMonty(
1256
1256
* This function is called "BIsZero" because
1257
1257
* "IsZero" would clash with Object::IsZero.
1258
1258
*/
1259
- static final function int BIsZero (
1260
- const out array <int > X
1261
- )
1259
+ static final function int BIsZero (const out array <int > X )
1262
1260
{
1263
1261
local int Z ;
1264
1262
local int U ;
@@ -1271,6 +1269,18 @@ static final function int BIsZero(
1271
1269
return ~(Z | -Z ) >>> 31 ;
1272
1270
}
1273
1271
1272
+ static final function int BIsZero_Static37 (const out int X [37 ])
1273
+ {
1274
+ local int Z ;
1275
+ local int U ;
1276
+
1277
+ Z = 0 ;
1278
+ for (U = (X [0 ] + 15 ) >>> 4 ; U > 0 ; --U )
1279
+ {
1280
+ Z = Z | X [U ];
1281
+ }
1282
+ return ~(Z | -Z ) >>> 31 ;
1283
+ }
1274
1284
1275
1285
/*
1276
1286
* Negate big integer conditionally. The value consists of 'len' words,
Original file line number Diff line number Diff line change @@ -283,8 +283,7 @@ static final function int RunCode(
283
283
case 4 :
284
284
break ;
285
285
default :
286
- // TODO: need static variant for this too.
287
- // R = R & (class'FCryptoBigInt'.static.BIsZero(T[D]));
286
+ R = R & class 'FCryptoBigInt' .static .BIsZero_Static37 (T [D ].X );
288
287
break ;
289
288
}
290
289
}
You can’t perform that action at this time.
0 commit comments