initialize res in java impl from values
This commit is contained in:
parent
0cfb8a0580
commit
6c30f7d432
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ public class DHSetup<T extends IGF> implements IDHSetup<T> {
|
|||
@Override
|
||||
public T power(T a, long b) {
|
||||
T aCopy = this.constructor.apply(new GF.Params(a.getCharacteristic(), a.getValue()));
|
||||
T res = a;
|
||||
T res = this.constructor.apply(new GF.Params(a.getCharacteristic(), a.getValue()));
|
||||
while (b > 0) {
|
||||
if (b % 2 == 1) {
|
||||
res.multiplyAssign(aCopy);
|
||||
|
|
Loading…
Reference in a new issue