encodeStr function

String encodeStr(
  1. Uint8List data,
  2. Encoding encoding
)

Implementation

String encodeStr(Uint8List data, Encoding encoding) {
  switch (encoding) {
    case Encoding.base58:
      return toB58(data);
    case Encoding.base64:
      return toB64(data);
    case Encoding.hex:
      return toHEX(data);
    default:
      throw ArgumentError(
        "Unsupported encoding, supported values are: base64, hex"
      );
  }
}