bytesToHex static method

String bytesToHex(
  1. List<int> bytes
)

Convert a list of bytes (for example a message digest) into a hex string.

Implementation

static String bytesToHex(List<int> bytes) {
  var result = new StringBuffer();
  for (var part in bytes) {
    result.write('${part < 16 ? '0' : ''}${part.toRadixString(16)}');
  }
  return result.toString();
}