Skip to content

Commit

Permalink
increase buffer read to 1mb
Browse files Browse the repository at this point in the history
  • Loading branch information
ibnaleem authored Jan 26, 2025
1 parent f5a5202 commit 5489cfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn identify_hash(hash: &String) -> String {
fn calculate_hash(hash_type: &String, filepath: &String) -> Result<String, Box<dyn std::error::Error>> {
let file = File::open(filepath)?;
let mut reader = BufReader::new(file);
let mut buffer = [0; 4096];
let mut buffer = [0; 1048576];

let mut hasher: Box<dyn digest::DynDigest> = match hash_type.to_lowercase().as_str() {
"md5" => Box::new(md5::Md5::new()),
Expand Down

0 comments on commit 5489cfc

Please sign in to comment.