From 9aea25ea328c6834b6f5959bc9ca4b873894e58c Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Sat, 31 Jul 2021 10:57:02 -0400 Subject: [PATCH] change import --- src/steamapi.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/steamapi.rs b/src/steamapi.rs index b98152e..5b20f21 100644 --- a/src/steamapi.rs +++ b/src/steamapi.rs @@ -3,7 +3,6 @@ use reqwest::{Url, cookie::{CookieStore}, header::COOKIE, header::{SET_COOKIE, U use rsa::{PublicKey, RsaPublicKey}; use std::time::{SystemTime, UNIX_EPOCH}; use serde::{Serialize, Deserialize}; -use rand::rngs::OsRng; use log::*; #[derive(Debug, Clone, Deserialize)] @@ -342,7 +341,7 @@ fn encrypt_password(rsa_resp: RsaResponse, password: &String) -> String { #[cfg(test)] let mut rng = rand::rngs::mock::StepRng::new(2, 1); #[cfg(not(test))] - let mut rng = OsRng; + let mut rng = rand::rngs::OsRng; let padding = rsa::PaddingScheme::new_pkcs1v15_encrypt(); let encrypted_password = base64::encode(public_key.encrypt(&mut rng, padding, password.as_bytes()).unwrap()); return encrypted_password;