padCount method
Get the number of pad bytes present in the block.
Implementation
@override
int padCount(Uint8List data) {
var count = clip8(data[data.length - 1]);
if (count > data.length || count == 0) {
throw ArgumentError('Invalid or corrupted pad block');
}
for (var i = 1; i <= count; i++) {
if (data[data.length - i] != count) {
throw ArgumentError('Invalid or corrupted pad block');
}
}
return count;
}