summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/Cargo.toml6
-rw-r--r--cli/compilers/ts.rs12
2 files changed, 9 insertions, 9 deletions
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index 09b881bf3..e1597b799 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -25,7 +25,7 @@ dirs = "2.0.2"
futures = "0.1.28"
http = "0.1.18"
hyper = "0.12.33"
-hyper-rustls = "0.16.1"
+hyper-rustls = "0.17.1"
indexmap = "1.1.0"
integer-atomics = "1.0.2"
lazy_static = "1.3.0"
@@ -34,7 +34,7 @@ log = "0.4.8"
rand = "0.6.5"
regex = "1.2.1"
remove_dir_all = "0.5.2"
-ring = "~0.14.6"
+ring = "0.16.8"
rustyline = "5.0.2"
serde = { version = "1.0.99", features = ["derive"] }
serde_derive = "1.0.99"
@@ -47,7 +47,7 @@ tokio-executor = "0.1.8"
tokio-fs = "0.1.6"
tokio-io = "0.1.12"
tokio-process = "0.2.4"
-tokio-rustls = "0.9.3"
+tokio-rustls = "0.10.0"
tokio-threadpool = "0.1.15"
url = "1.7.2"
utime = "0.2.1"
diff --git a/cli/compilers/ts.rs b/cli/compilers/ts.rs
index e8766cba7..414f18e14 100644
--- a/cli/compilers/ts.rs
+++ b/cli/compilers/ts.rs
@@ -165,7 +165,7 @@ fn req(
}
fn gen_hash(v: Vec<&[u8]>) -> String {
- let mut ctx = ring::digest::Context::new(&ring::digest::SHA1);
+ let mut ctx = ring::digest::Context::new(&ring::digest::SHA256);
for src in v.iter() {
ctx.update(src);
}
@@ -178,7 +178,7 @@ fn gen_hash(v: Vec<&[u8]>) -> String {
out
}
-/// Emit a SHA1 hash based on source code, deno version and TS config.
+/// Emit a SHA256 hash based on source code, deno version and TS config.
/// Used to check if a recompilation for source code is needed.
pub fn source_code_version_hash(
source_code: &[u8],
@@ -707,22 +707,22 @@ mod tests {
#[test]
fn test_source_code_version_hash() {
assert_eq!(
- "08574f9cdeb94fd3fb9cdc7a20d086daeeb42bca",
+ "0185b42de0686b4c93c314daaa8dee159f768a9e9a336c2a5e3d5b8ca6c4208c",
source_code_version_hash(b"1+2", "0.4.0", b"{}")
);
// Different source_code should result in different hash.
assert_eq!(
- "d8abe2ead44c3ff8650a2855bf1b18e559addd06",
+ "e58631f1b6b6ce2b300b133ec2ad16a8a5ba6b7ecf812a8c06e59056638571ac",
source_code_version_hash(b"1", "0.4.0", b"{}")
);
// Different version should result in different hash.
assert_eq!(
- "d6feffc5024d765d22c94977b4fe5975b59d6367",
+ "307e6200347a88dbbada453102deb91c12939c65494e987d2d8978f6609b5633",
source_code_version_hash(b"1", "0.1.0", b"{}")
);
// Different config should result in different hash.
assert_eq!(
- "3b35db249b26a27decd68686f073a58266b2aec2",
+ "195eaf104a591d1d7f69fc169c60a41959c2b7a21373cd23a8f675f877ec385f",
source_code_version_hash(b"1", "0.4.0", b"{\"compilerOptions\": {}}")
);
}