add func paddingv3 & fix buffer.length is 0 bug