I may have found something, if I set the padding in C# to PKCS7 rather than None I get the same 32 byte output as M2Crypto. Now I just need to figure out how to turn padding off in M2Crypto...