rm bytes dependency

This commit is contained in:
Sosthene00 2024-04-02 14:30:10 +02:00
parent f0bf17dd6a
commit fbddacdeb8
2 changed files with 2 additions and 5 deletions

View File

@ -20,7 +20,6 @@ log = "0.4.6"
tsify = { git = "https://github.com/Sosthene00/tsify", branch = "next" }
aes-gcm = "0.10.3"
aes = "0.8.3"
bytes = "1.5.0"
shamir = { git = "https://github.com/Sosthene00/shamir", branch = "master" }
[dev-dependencies]

View File

@ -4,7 +4,6 @@ use aes_gcm::AeadCore;
use aes_gcm::KeyInit;
use aes_gcm::{aead::Buffer, Aes256Gcm, Key};
use anyhow::{Error, Result};
use bytes::Buf;
use rand::{self, thread_rng, Rng, RngCore};
use serde::{Deserialize, Serialize};
use serde_json::{json, Value};
@ -19,8 +18,7 @@ use wasm_bindgen::prelude::*;
use shamir::SecretData;
use std::collections::HashMap;
use std::fs::File;
use std::io::Read;
use std::io::Write;
use std::io::{Read, Write, Cursor};
use std::str::FromStr;
use std::sync::{Mutex, OnceLock};
@ -205,7 +203,7 @@ impl User {
let mut cipher_scan_key = [0u8; 60];
let mut part1_ciphertext = [0u8; 44];
let mut reader = recover_data.reader();
let mut reader = Cursor::new(recover_data);
reader.read_exact(&mut entropy1)?;
reader.read_exact(&mut entropy2)?;
reader.read_exact(&mut entropy3)?;