mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-18 01:17:50 +00:00
{model,util}/Cargo.toml: Updated blake2 from 0.9 to 0.10.
This commit is contained in:
@@ -22,7 +22,7 @@ garage_util = { version = "0.8.1", path = "../util" }
|
||||
|
||||
async-trait = "0.1.7"
|
||||
arc-swap = "1.0"
|
||||
blake2 = "0.9"
|
||||
blake2 = "0.10"
|
||||
err-derive = "0.3"
|
||||
hex = "0.4"
|
||||
base64 = "0.21"
|
||||
|
||||
@@ -173,9 +173,9 @@ impl Crdt for DvvsEntry {
|
||||
|
||||
impl PartitionKey for K2VItemPartition {
|
||||
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.partition_key.as_bytes());
|
||||
let mut hash = [0u8; 32];
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ garage_db = { version = "0.8.1", path = "../db" }
|
||||
|
||||
arc-swap = "1.0"
|
||||
async-trait = "0.1"
|
||||
blake2 = "0.9"
|
||||
blake2 = "0.10"
|
||||
bytes = "1.0"
|
||||
digest = "0.10"
|
||||
err-derive = "0.3"
|
||||
|
||||
+2
-2
@@ -115,9 +115,9 @@ pub fn sha256sum(data: &[u8]) -> Hash {
|
||||
|
||||
/// Compute the blake2 of a slice
|
||||
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);
|
||||
let mut hash = [0u8; 32];
|
||||
hash.copy_from_slice(&hasher.finalize()[..32]);
|
||||
|
||||
Reference in New Issue
Block a user