toHex method
Converts the public key to its hexadecimal representation.
If withPrefix
is true (default), includes the prefix byte in the hexadecimal string.
Otherwise, excludes the prefix byte.
Implementation
String toHex([bool withPrefix = true]) {
return BytesUtils.toHexString(toBytes(withPrefix));
}