18. Bech32 Encode & Decode

Bech32是一种带有校验和的base32编码格式,最初为Bitcoin的隔离见证地址设计。它由可读前缀、分隔符('1')和至少6个字符的数据部分组成,不包含特定的字母。数据部分末尾的6位用于校验。要了解更多详情,可以查阅BIP173和bitcoinjs/bech32。
摘要由CSDN通过智能技术生成

What is Bech32

This document proposes a checksummed base32 format, “Bech32”, and a standard for native segregated witness output addresses using it.

See Detail BIP173

Why need it

最早是在 Bitcoin 中,为了隔离见证而使用的一种地址编码格式。

Bech32 是一直最长 90 个字符的字符串,其组成如下:

  • hrp: human-readable part, 可读前缀
  • seperator: which is always “1”. In case “1” is allowed inside the human-readable part, the last one in the string is the separator
  • data part: which is at least 6 characters long and only consists of alphanumeric characters excluding “1”, “b”, “i”, and “o”

CheckSum : 在其 data part 的最后 6 位为该字符串的 checkSum,可用于校验该字符串的正确性。

How to use

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值