{model,util}/Cargo.toml: Updated blake2 from 0.9 to 0.10.
This commit is contained in:
parent
fbafa76284
commit
f952e37ba7
5 changed files with 10 additions and 22 deletions
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -439,13 +439,11 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blake2"
|
name = "blake2"
|
||||||
version = "0.9.2"
|
version = "0.10.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0a4e37d16930f5459780f5621038b6382b9bb37c19016f39fb6b5808d831f174"
|
checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crypto-mac 0.8.0",
|
"digest 0.10.6",
|
||||||
"digest 0.9.0",
|
|
||||||
"opaque-debug",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -696,16 +694,6 @@ dependencies = [
|
||||||
"typenum",
|
"typenum",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "crypto-mac"
|
|
||||||
version = "0.8.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab"
|
|
||||||
dependencies = [
|
|
||||||
"generic-array",
|
|
||||||
"subtle",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crypto-mac"
|
name = "crypto-mac"
|
||||||
version = "0.11.1"
|
version = "0.11.1"
|
||||||
|
@ -1541,7 +1529,7 @@ version = "0.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
|
checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crypto-mac 0.11.1",
|
"crypto-mac",
|
||||||
"digest 0.9.0",
|
"digest 0.9.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ garage_util = { version = "0.8.1", path = "../util" }
|
||||||
|
|
||||||
async-trait = "0.1.7"
|
async-trait = "0.1.7"
|
||||||
arc-swap = "1.0"
|
arc-swap = "1.0"
|
||||||
blake2 = "0.9"
|
blake2 = "0.10"
|
||||||
err-derive = "0.3"
|
err-derive = "0.3"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
base64 = "0.21"
|
base64 = "0.21"
|
||||||
|
|
|
@ -173,9 +173,9 @@ impl Crdt for DvvsEntry {
|
||||||
|
|
||||||
impl PartitionKey for K2VItemPartition {
|
impl PartitionKey for K2VItemPartition {
|
||||||
fn hash(&self) -> Hash {
|
fn hash(&self) -> Hash {
|
||||||
use blake2::{Blake2b, Digest};
|
use blake2::{Blake2b512, Digest};
|
||||||
|
|
||||||
let mut hasher = Blake2b::new();
|
let mut hasher = Blake2b512::new();
|
||||||
hasher.update(self.bucket_id.as_slice());
|
hasher.update(self.bucket_id.as_slice());
|
||||||
hasher.update(self.partition_key.as_bytes());
|
hasher.update(self.partition_key.as_bytes());
|
||||||
let mut hash = [0u8; 32];
|
let mut hash = [0u8; 32];
|
||||||
|
|
|
@ -18,7 +18,7 @@ garage_db = { version = "0.8.1", path = "../db" }
|
||||||
|
|
||||||
arc-swap = "1.0"
|
arc-swap = "1.0"
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
blake2 = "0.9"
|
blake2 = "0.10"
|
||||||
bytes = "1.0"
|
bytes = "1.0"
|
||||||
digest = "0.10"
|
digest = "0.10"
|
||||||
err-derive = "0.3"
|
err-derive = "0.3"
|
||||||
|
|
|
@ -115,9 +115,9 @@ pub fn sha256sum(data: &[u8]) -> Hash {
|
||||||
|
|
||||||
/// Compute the blake2 of a slice
|
/// Compute the blake2 of a slice
|
||||||
pub fn blake2sum(data: &[u8]) -> Hash {
|
pub fn blake2sum(data: &[u8]) -> Hash {
|
||||||
use blake2::{Blake2b, Digest};
|
use blake2::{Blake2b512, Digest};
|
||||||
|
|
||||||
let mut hasher = Blake2b::new();
|
let mut hasher = Blake2b512::new();
|
||||||
hasher.update(data);
|
hasher.update(data);
|
||||||
let mut hash = [0u8; 32];
|
let mut hash = [0u8; 32];
|
||||||
hash.copy_from_slice(&hasher.finalize()[..32]);
|
hash.copy_from_slice(&hasher.finalize()[..32]);
|
||||||
|
|
Loading…
Reference in a new issue