Skip to content

Commit 6bd6301

Browse files
committed
Upgrade bech32 dependency
Upgrade to the newest release of the `bech32` crate. Please note I quickly skimmed bip 380 and briefly thought what the code length should be, but the value used (1023) needs reviewing by a cryptographer - FTR I copied it from `bech32`.
1 parent 5719714 commit 6bd6301

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ rand = ["bitcoin/rand"]
2222
base64 = ["bitcoin/base64"]
2323

2424
[dependencies]
25-
bech32 = { version = "0.10.0-beta", default-features = false }
25+
bech32 = { version = "0.11.0", default-features = false }
2626
bitcoin = { version = "0.31.0", default-features = false }
2727

2828
# Do NOT use this as a feature! Use the `serde` feature instead.

src/descriptor/checksum.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use crate::prelude::*;
1919
use crate::Error;
2020

2121
const CHECKSUM_LENGTH: usize = 8;
22+
const CODE_LENGTH: usize = 32767;
2223

2324
/// Compute the checksum of a descriptor.
2425
///
@@ -142,6 +143,7 @@ const GEN: [u64; 5] = [0xf5dee51989, 0xa9fdca3312, 0x1bab10e32d, 0x3706b1677a, 0
142143
impl Checksum for DescriptorChecksum {
143144
type MidstateRepr = u64; // We need 40 bits (8 * 5).
144145
const CHECKSUM_LENGTH: usize = CHECKSUM_LENGTH;
146+
const CODE_LENGTH: usize = CODE_LENGTH;
145147
const GENERATOR_SH: [u64; 5] = GEN;
146148
const TARGET_RESIDUE: u64 = 1;
147149
}

0 commit comments

Comments
 (0)