addPadding method

  1. @override
int addPadding(
  1. Uint8List data,
  2. int offset
)
override

add the pad bytes to the passed in block, returning the number of bytes added.

Implementation

@override
int addPadding(Uint8List data, int offset) {
  var added = data.length - offset;

  data[offset] = 0x80;
  offset++;

  while (offset < data.length) {
    data[offset] = 0;
    offset++;
  }

  return added;
}