rm bytes dependency
This commit is contained in:
parent
f0bf17dd6a
commit
fbddacdeb8
@ -20,7 +20,6 @@ log = "0.4.6"
|
|||||||
tsify = { git = "https://github.com/Sosthene00/tsify", branch = "next" }
|
tsify = { git = "https://github.com/Sosthene00/tsify", branch = "next" }
|
||||||
aes-gcm = "0.10.3"
|
aes-gcm = "0.10.3"
|
||||||
aes = "0.8.3"
|
aes = "0.8.3"
|
||||||
bytes = "1.5.0"
|
|
||||||
shamir = { git = "https://github.com/Sosthene00/shamir", branch = "master" }
|
shamir = { git = "https://github.com/Sosthene00/shamir", branch = "master" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -4,7 +4,6 @@ use aes_gcm::AeadCore;
|
|||||||
use aes_gcm::KeyInit;
|
use aes_gcm::KeyInit;
|
||||||
use aes_gcm::{aead::Buffer, Aes256Gcm, Key};
|
use aes_gcm::{aead::Buffer, Aes256Gcm, Key};
|
||||||
use anyhow::{Error, Result};
|
use anyhow::{Error, Result};
|
||||||
use bytes::Buf;
|
|
||||||
use rand::{self, thread_rng, Rng, RngCore};
|
use rand::{self, thread_rng, Rng, RngCore};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::{json, Value};
|
use serde_json::{json, Value};
|
||||||
@ -19,8 +18,7 @@ use wasm_bindgen::prelude::*;
|
|||||||
use shamir::SecretData;
|
use shamir::SecretData;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Read;
|
use std::io::{Read, Write, Cursor};
|
||||||
use std::io::Write;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use std::sync::{Mutex, OnceLock};
|
use std::sync::{Mutex, OnceLock};
|
||||||
|
|
||||||
@ -205,7 +203,7 @@ impl User {
|
|||||||
let mut cipher_scan_key = [0u8; 60];
|
let mut cipher_scan_key = [0u8; 60];
|
||||||
let mut part1_ciphertext = [0u8; 44];
|
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 entropy1)?;
|
||||||
reader.read_exact(&mut entropy2)?;
|
reader.read_exact(&mut entropy2)?;
|
||||||
reader.read_exact(&mut entropy3)?;
|
reader.read_exact(&mut entropy3)?;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user