mirror of
https://github.com/bacher09/pwgen-for-bios.git
synced 2024-09-19 15:28:54 -04:00
Fix bug with signed to unsigned modulo
This commit is contained in:
parent
0f8fb09e69
commit
1e7928717f
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ function rsaDecrypt(code: number[]): number[] {
|
|||
const q: number = 3544934711;
|
||||
const e = 41;
|
||||
const phi = (new Long(p - 1, 0, true)).mul(q - 1);
|
||||
const d: Long = modInvEuclid(new Long(e), phi) as Long;
|
||||
const d: Long = modInvEuclid(new Long(e, 0, true), phi) as Long;
|
||||
|
||||
const dp = d.mod(p - 1);
|
||||
const dq = d.mod(q - 1);
|
||||
|
|
Loading…
Reference in a new issue