Pad function depends on block size