fmt
This commit is contained in:
parent
b436e25188
commit
5ae2a09239
1 changed files with 4 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
use colog;
|
use colog;
|
||||||
use log::{info, error, warn};
|
use log::{error, info, warn};
|
||||||
use num::BigUint;
|
use num::BigUint;
|
||||||
use num_primes::Generator;
|
use num_primes::Generator;
|
||||||
use num_traits::cast::ToPrimitive;
|
use num_traits::cast::ToPrimitive;
|
||||||
|
@ -24,8 +24,7 @@ impl RSA {
|
||||||
|
|
||||||
let n = &p_bigint * &q_bigint;
|
let n = &p_bigint * &q_bigint;
|
||||||
|
|
||||||
let phi =
|
let phi = (&p_bigint - BigUint::one()) * (&q_bigint - BigUint::one());
|
||||||
(&p_bigint - BigUint::one()) * (&q_bigint - BigUint::one());
|
|
||||||
|
|
||||||
let e = num::BigUint::from(65537u32);
|
let e = num::BigUint::from(65537u32);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue