Skip to content

Commit 9c5ccae

Browse files
authored
update md-5, sha2, blake2 (#1647)
1 parent 15af24a commit 9c5ccae

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

datafusion/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ pin-project-lite= "^0.2.7"
6464
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread", "sync", "fs"] }
6565
tokio-stream = "0.1"
6666
log = "^0.4"
67-
md-5 = { version = "^0.9.1", optional = true }
68-
sha2 = { version = "^0.9.1", optional = true }
69-
blake2 = { version = "^0.9.2", optional = true }
67+
md-5 = { version = "^0.10.0", optional = true }
68+
sha2 = { version = "^0.10.1", optional = true }
69+
blake2 = { version = "^0.10.2", optional = true }
7070
blake3 = { version = "1.0", optional = true }
7171
ordered-float = "2.0"
7272
unicode-segmentation = { version = "^1.7.1", optional = true }

datafusion/src/physical_plan/crypto_expressions.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use arrow::{
2828
},
2929
datatypes::DataType,
3030
};
31-
use blake2::{Blake2b, Blake2s, Digest};
31+
use blake2::{Blake2b512, Blake2s256, Digest};
3232
use blake3::Hasher as Blake3;
3333
use md5::Md5;
3434
use sha2::{Sha224, Sha256, Sha384, Sha512};
@@ -115,8 +115,8 @@ impl DigestAlgorithm {
115115
Self::Sha256 => digest_to_scalar!(Sha256, value),
116116
Self::Sha384 => digest_to_scalar!(Sha384, value),
117117
Self::Sha512 => digest_to_scalar!(Sha512, value),
118-
Self::Blake2b => digest_to_scalar!(Blake2b, value),
119-
Self::Blake2s => digest_to_scalar!(Blake2s, value),
118+
Self::Blake2b => digest_to_scalar!(Blake2b512, value),
119+
Self::Blake2s => digest_to_scalar!(Blake2s256, value),
120120
Self::Blake3 => ScalarValue::Binary(value.as_ref().map(|v| {
121121
let mut digest = Blake3::default();
122122
digest.update(v.as_bytes());
@@ -145,8 +145,8 @@ impl DigestAlgorithm {
145145
Self::Sha256 => digest_to_array!(Sha256, input_value),
146146
Self::Sha384 => digest_to_array!(Sha384, input_value),
147147
Self::Sha512 => digest_to_array!(Sha512, input_value),
148-
Self::Blake2b => digest_to_array!(Blake2b, input_value),
149-
Self::Blake2s => digest_to_array!(Blake2s, input_value),
148+
Self::Blake2b => digest_to_array!(Blake2b512, input_value),
149+
Self::Blake2s => digest_to_array!(Blake2s256, input_value),
150150
Self::Blake3 => {
151151
let binary_array: BinaryArray = input_value
152152
.iter()

0 commit comments

Comments
 (0)