<commit_before>
part of asn1lib;


String listToHexString(List<int> list) {

  StringBuffer b = new StringBuffer("[");
  bool doComma = false;
  list.forEach( (v) {
    if( v != null) {
      if( doComma ) {
        b.write(", ");
      } else {
        doComma = true;
      }
      //b.add("0x");
      b.write((v <= 0xf ? "0" : ""));
      b.write( v.toRadixString(16));
    }
  });
  b.write("]");
  return b.toString();
}

String hex(dynamic x) {
  if( x is List)
    return listToHexString(x);
  else
    return x.toRadixString(16);
}

class ASN1Util {

  static String listToString(List<int> list) {

    StringBuffer b = new StringBuffer("[");
    bool doComma = false;
    list.forEach( (v) {
      if( doComma ) {
        b.write(", ");
      } else {
        doComma = true;
      }
      b.write("0x")..
        write( v.toRadixString(16));
<commit_msg>fixes for M3. Mostly byte buffer changes<commit_after>
part of asn1lib;


String listToHexString(List<int> list) {

  StringBuffer b = new StringBuffer("[");
  bool doComma = false;
  list.forEach( (v) {
    if( v != null) {
      if( doComma ) {
        b.write(", ");
      } else {
        doComma = true;
      }
      //b.add("0x");
      b.write((v <= 0xf ? "0" : ""));
      b.write( v.toRadixString(16));
    }
  });
  b.write("]");
  return b.toString();
}

String hex(dynamic x) {
  if( x is List)
    return listToHexString(x);
  else
    return x.toRadixString(16);
}

class ASN1Util {

  // convert a list to a hex string. Used for debugging ASN1 output
  static String listToString(List<int> list) {
    StringBuffer b = new StringBuffer("[");
    bool doComma = false;
    list.forEach( (v) {
      doComma ? b.write(", ") : doComma = true;
      b.write("0x${v.toRadixString(16)}");
{'fraction_non_alphanumeric': 0.16789563244469655, 'fraction_numerical': 0.01474758933635848, 'mean_word_length': 2.347248576850095, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1953075', 'n_tokens_mistral': 664, 'n_tokens_neox': 655, 'n_words': 154}