padUint8ListTo32 static method

Uint8List padUint8ListTo32(
  1. Uint8List data
)

Implementation

static Uint8List padUint8ListTo32(Uint8List data) {
  assert(data.length <= 32);
  if (data.length == 32) return data;

  // todo there must be a faster way to do this?
  return Uint8List(32)..setRange(32 - data.length, 32, data);
}