See, this is what happens when there's one function you borrow from the Internet. Fixed broken PKCS#7 padding function.