encode static method

String encode(
  1. List<int> bytes
)

Implementation

static String encode(List<int> bytes) {
  var buffer = StringBuffer();
  for (int byte in bytes) {
    if (byte & 0xff != byte) {
      throw FormatException("Invalid byte $byte detected");
    }
    buffer.write('${byte < 16 ? '0' : ''}${byte.toRadixString(16)}');
  }
  return buffer.toString();
}