1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-25 16:49:18 -05:00

chore(std/hash): update crates (#7631)

This commit is contained in:
Luca Casonato 2020-09-22 23:03:11 +02:00 committed by GitHub
parent f601721851
commit cf0c49191e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 86 additions and 84 deletions

1
.gitignore vendored
View file

@ -8,6 +8,7 @@
gclient_config.py_entries
/gh-pages/
/target/
/std/hash/_wasm/target
# Files that help ensure VSCode can work but we don't want checked into the
# repo

View file

@ -2,24 +2,19 @@
# It is not intended for manual editing.
[[package]]
name = "block-buffer"
version = "0.7.3"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b"
checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
dependencies = [
"block-padding",
"byte-tools",
"byteorder",
"generic-array",
]
[[package]]
name = "block-padding"
version = "0.1.5"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
dependencies = [
"byte-tools",
]
checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae"
[[package]]
name = "bumpalo"
@ -27,24 +22,18 @@ version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820"
[[package]]
name = "byte-tools"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
[[package]]
name = "byteorder"
version = "1.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "cpuid-bool"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634"
[[package]]
name = "deno-hash"
version = "0.1.0"
@ -63,26 +52,21 @@ dependencies = [
[[package]]
name = "digest"
version = "0.8.1"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5"
checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
dependencies = [
"generic-array",
]
[[package]]
name = "fake-simd"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed"
[[package]]
name = "generic-array"
version = "0.12.3"
version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec"
checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
dependencies = [
"typenum",
"version_check",
]
[[package]]
@ -108,9 +92,9 @@ dependencies = [
[[package]]
name = "md-5"
version = "0.8.0"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a18af3dcaf2b0219366cdb4e2af65a6101457b415c3d1a5c71dd9c2b7c77b9c8"
checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15"
dependencies = [
"block-buffer",
"digest",
@ -119,9 +103,9 @@ dependencies = [
[[package]]
name = "md2"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f130b74b5f0b05ffd405280ed1a9c2e4539fc3ca01f37b9ea947cd64922116e9"
checksum = "bfd23bb613adebff88451d962b449f93e2ca5d97400021ad5895740778d95f78"
dependencies = [
"block-buffer",
"digest",
@ -130,21 +114,20 @@ dependencies = [
[[package]]
name = "md4"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4030c65cf2aab7ada769cae7d1e7159f8d034d6ded4f39afba037f094bfd9a1"
checksum = "dd1a7931601ee6a560262a1dc9a8369949f5b7ae20b2bbf029c74fbd6d1b09e2"
dependencies = [
"block-buffer",
"digest",
"fake-simd",
"opaque-debug",
]
[[package]]
name = "opaque-debug"
version = "0.2.3"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "proc-macro2"
@ -166,9 +149,9 @@ dependencies = [
[[package]]
name = "ripemd160"
version = "0.8.0"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad5112e0dbbb87577bfbc56c42450235e3012ce336e29c5befd7807bd626da4a"
checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251"
dependencies = [
"block-buffer",
"digest",
@ -177,9 +160,9 @@ dependencies = [
[[package]]
name = "ripemd320"
version = "0.8.0"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d1df357078db685e0a2d14b0eac053da79878026bb205da7050d8a5168e208b"
checksum = "4ff9fb4227f99b2078691fbd1bf16edd94041f15b02a3c7b4a155d0074954191"
dependencies = [
"block-buffer",
"digest",
@ -188,36 +171,37 @@ dependencies = [
[[package]]
name = "sha-1"
version = "0.8.2"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df"
checksum = "170a36ea86c864a3f16dd2687712dd6646f7019f301e57537c7f4dc9f5916770"
dependencies = [
"block-buffer",
"cfg-if",
"cpuid-bool",
"digest",
"fake-simd",
"opaque-debug",
]
[[package]]
name = "sha2"
version = "0.8.2"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69"
checksum = "2933378ddfeda7ea26f48c555bdad8bb446bf8a3d17832dc83e380d444cfb8c1"
dependencies = [
"block-buffer",
"cfg-if",
"cpuid-bool",
"digest",
"fake-simd",
"opaque-debug",
]
[[package]]
name = "sha3"
version = "0.8.2"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf"
checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809"
dependencies = [
"block-buffer",
"byte-tools",
"digest",
"keccak",
"opaque-debug",
@ -247,10 +231,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
[[package]]
name = "wasm-bindgen"
version = "0.2.63"
name = "version_check"
version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c2dc4aa152834bc334f506c1a06b866416a8b6697d5c9f75b9a689c8486def0"
checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
[[package]]
name = "wasm-bindgen"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42"
dependencies = [
"cfg-if",
"wasm-bindgen-macro",
@ -258,9 +248,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.63"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ded84f06e0ed21499f6184df0e0cb3494727b0c5da89534e0fcc55c51d812101"
checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68"
dependencies = [
"bumpalo",
"lazy_static",
@ -273,9 +263,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.63"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "838e423688dac18d73e31edce74ddfac468e37b1506ad163ffaf0a46f703ffe3"
checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@ -283,9 +273,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.63"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3156052d8ec77142051a533cdd686cba889537b213f948cd1d20869926e68e92"
checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe"
dependencies = [
"proc-macro2",
"quote",
@ -296,6 +286,6 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.63"
version = "0.2.68"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9ba19973a58daf4db6f352eda73dc0e289493cd29fb2632eb172085b6521acd"
checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307"

View file

@ -10,17 +10,20 @@ repository = "https://github.com/denoland/deno"
crate-type = ["cdylib"]
[dependencies]
digest = "0.8.1"
md2 = "0.8"
md4 = "0.8"
md-5 = "0.8"
ripemd160 = "0.8.0"
ripemd320 = "0.8.0"
sha-1 = "0.8.2"
sha2 = "0.8.2"
sha3 = "0.8.2"
wasm-bindgen = "0.2.63"
digest = "0.9.0"
md2 = "0.9.0"
md4 = "0.9.0"
md-5 = "0.9.1"
ripemd160 = "0.9.1"
ripemd320 = "0.9.0"
sha-1 = "0.9.1"
sha2 = "0.9.1"
sha3 = "0.9.1"
wasm-bindgen = "0.2.68"
[profile.release]
lto = true
opt-level = 3
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O", "--enable-mutable-globals"]

View file

@ -34,6 +34,7 @@ async function generate(wasm: string, output: string): Promise<void> {
const denoHashScript =
"/* eslint-disable */\n" +
"//deno-fmt-ignore-file\n" +
"//deno-lint-ignore-file\n" +
`import * as base64 from "../../encoding/base64.ts";` +
`export const source = base64.decode("${wasm}");` +
initScript;

View file

@ -42,10 +42,10 @@ pub fn create_hash(algorithm: &str) -> Result<DenoHash, JsValue> {
#[wasm_bindgen]
pub fn update_hash(hash: &mut DenoHash, data: &[u8]) {
hash.inner.input(data)
hash.inner.update(data)
}
#[wasm_bindgen]
pub fn digest_hash(hash: &mut DenoHash) -> Box<[u8]> {
hash.inner.result_reset()
hash.inner.finalize_reset()
}

File diff suppressed because one or more lines are too long