Skip to content

Commit

Permalink
Switches SHA1 for SHA2 (#764)
Browse files Browse the repository at this point in the history
This removes the SHA1 library and replaces it with the SHA2 library.

Co-authored-by: Jeramy Singleton <wisingle@microsoft.com>
  • Loading branch information
jeramyRR and Jeramy Singleton committed Jan 7, 2023
1 parent 2f60362 commit c9867cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion meta/Cargo.toml
Expand Up @@ -20,4 +20,4 @@ pest = { path = "../pest", version = "2.5.2" }
once_cell = "1.8.0"

[build-dependencies]
sha1 = { version = "0.10", default-features = false }
sha2 = { version = "0.10", default-features = false }
6 changes: 2 additions & 4 deletions meta/build.rs
@@ -1,6 +1,4 @@
extern crate sha1;

use sha1::{Digest, Sha1};
use sha2::{Digest, Sha256};
use std::env;
use std::fs::{self, File};
use std::io::prelude::*;
Expand All @@ -25,7 +23,7 @@ fn main() {

// If `grammar.pest` exists (we're building from git sources)
if grammar_pest_path.exists() {
let mut sha = Sha1::default();
let mut sha = Sha256::default();

let old_hash = File::open(&hash_path).ok().map(|mut file| {
let mut s = String::new();
Expand Down

0 comments on commit c9867cf

Please sign in to comment.