Skip to content

Commit

Permalink
Update deps. Bump version to 0.3.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoquick committed Dec 7, 2023
1 parent eb0c38a commit ba836bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "carbonado"
version = "0.3.5"
version = "0.3.6"
edition = "2021"
license = "MIT"
description = "An apocalypse-resistant data storage format for the truly paranoid."
Expand All @@ -23,7 +23,7 @@ libsecp256k1 = { version = "0.7.1", features = ["std"] }
log = "0.4.19"
nom = "7.1.3"
pretty_env_logger = "0.5.0"
secp256k1 = { version = "0.27.0", features = [
secp256k1 = { version = "0.28.0", features = [
"global-context",
"rand-std",
"serde",
Expand All @@ -32,7 +32,7 @@ serde = "1.0.164"
snap = "1.1.0"
thiserror = "1.0"
zfec-rs = "0.1.0"
once_cell = "=1.18.0"
once_cell = "1.19.0"

[dev-dependencies]
anyhow = "1.0.71"
Expand Down
10 changes: 5 additions & 5 deletions src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl TryFrom<&File> for Header {
let signature = Signature::from_compact(&signature)?;

// Verify hash against signature
signature.verify(&Message::from_slice(&hash)?, &pubkey)?;
signature.verify(&Message::from_digest_slice(&hash)?, &pubkey)?;

let hash = bao::Hash::try_from(hash)?;

Expand Down Expand Up @@ -132,7 +132,7 @@ impl TryFrom<&[u8]> for Header {
let signature = Signature::from_compact(signature)?;

// Verify hash against signature
signature.verify(&Message::from_slice(hash)?, &pubkey)?;
signature.verify(&Message::from_digest_slice(hash)?, &pubkey)?;

let hash: [u8; 32] = hash[0..32].try_into()?;
let hash = bao::Hash::try_from(hash)?;
Expand Down Expand Up @@ -180,7 +180,7 @@ impl TryFrom<Bytes> for Header {
let signature = Signature::from_compact(signature)?;

// Verify hash against signature
signature.verify(&Message::from_slice(hash)?, &pubkey)?;
signature.verify(&Message::from_digest_slice(hash)?, &pubkey)?;

let hash: [u8; 32] = hash[0..32].try_into()?;
let hash = bao::Hash::try_from(hash)?;
Expand Down Expand Up @@ -228,7 +228,7 @@ impl TryFrom<&Bytes> for Header {
let signature = Signature::from_compact(signature)?;

// Verify hash against signature
signature.verify(&Message::from_slice(hash)?, &pubkey)?;
signature.verify(&Message::from_digest_slice(hash)?, &pubkey)?;

let hash: [u8; 32] = hash[0..32].try_into()?;
let hash = bao::Hash::try_from(hash)?;
Expand Down Expand Up @@ -266,7 +266,7 @@ impl Header {
padding_len: u32,
metadata: Option<[u8; 8]>,
) -> Result<Self, CarbonadoError> {
let msg = Message::from_slice(hash)?;
let msg = Message::from_digest_slice(hash)?;
let pubkey = PublicKey::from_slice(pk)?;
let signature = SecretKey::from_slice(sk)?.sign_ecdsa(msg);
let hash = decode_bao_hash(hash)?;
Expand Down

0 comments on commit ba836bf

Please sign in to comment.