without seeing your changes, it's hard to tell, but per the errors, it looks like you're not padding the result correctly for the cipher mode. this RFC has some test vectors, have you ensured that your code passes those?
OK. Thanks!Ah, yeah, i would not expect that change to work well. you should probably make a newxform
and wire it through, but we don't have any specific advice on doing so.