public class B58 extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
B58.Decoded |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
decode(String input) |
byte[] |
decodeChecked(String input,
int version)
Uses the checksum in the last 4 bytes of the decoded data to verify the rest are correct.
|
B58.Decoded |
decodeMulti(String input,
int expectedLength,
byte[]... possibleVersions) |
BigInteger |
decodeToBigInteger(String input) |
byte[] |
encodeToBytes(byte[] input)
Encodes the given bytes in base58.
|
byte[] |
encodeToBytesChecked(byte[] input,
byte[] version) |
byte[] |
encodeToBytesChecked(byte[] input,
int version) |
String |
encodeToString(byte[] input) |
String |
encodeToStringChecked(byte[] input,
byte[] version) |
String |
encodeToStringChecked(byte[] input,
int version) |
byte[] |
findPrefix(int payLoadLength,
String desiredPrefix) |
public B58(String alphabet)
public byte[] findPrefix(int payLoadLength,
String desiredPrefix)
public String encodeToStringChecked(byte[] input, int version)
public String encodeToStringChecked(byte[] input, byte[] version)
public byte[] encodeToBytesChecked(byte[] input,
int version)
public byte[] encodeToBytesChecked(byte[] input,
byte[] version)
public String encodeToString(byte[] input)
public byte[] encodeToBytes(byte[] input)
input - bytes to be encoded.public byte[] decode(String input) throws EncodingFormatException
public BigInteger decodeToBigInteger(String input) throws EncodingFormatException
public byte[] decodeChecked(String input, int version) throws EncodingFormatException
input - input value.version - version.EncodingFormatException - if the input is not baseFields 58 or the checksum does not validate.public B58.Decoded decodeMulti(String input, int expectedLength, byte[]... possibleVersions) throws EncodingFormatException
Copyright © 2021. All rights reserved.