public class Bech32
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Bech32.Bech32Data |
static class |
Bech32.Encoding |
| Constructor and Description |
|---|
Bech32() |
| Modifier and Type | Method and Description |
|---|---|
static Bech32.Bech32Data |
decode(java.lang.String str)
Decode a Bech32 string.
|
static java.lang.String |
encode(Bech32.Bech32Data bech32)
Encode a Bech32 string.
|
static java.lang.String |
encode(Bech32.Encoding encoding,
java.lang.String hrp,
byte[] values)
Encode a Bech32 string.
|
public static java.lang.String encode(Bech32.Bech32Data bech32)
bech32 - the Bech32 to encodepublic static java.lang.String encode(Bech32.Encoding encoding, java.lang.String hrp, byte[] values)
encoding - the encoding to usehrp - the human-readable part of the Bech32 stringvalues - the data part of the Bech32 stringpublic static Bech32.Bech32Data decode(java.lang.String str) throws AddressFormatException
str - the Bech32 string to decodeAddressFormatException - if the string is not a valid Bech32 string