Implement Bech32m encoding/decoding

This commit is contained in:
Pieter Wuille
2021-01-05 12:55:15 -08:00
parent 4ba1bab443
commit da2bb6976d
6 changed files with 82 additions and 58 deletions

View File

@@ -19,7 +19,7 @@ static void Bech32Encode(benchmark::Bench& bench)
tmp.reserve(1 + 32 * 8 / 5);
ConvertBits<8, 5, true>([&](unsigned char c) { tmp.push_back(c); }, v.begin(), v.end());
bench.batch(v.size()).unit("byte").run([&] {
bech32::Encode("bc", tmp);
bech32::Encode(bech32::Encoding::BECH32, "bc", tmp);
});
}