auth0/node-xml-encryption — pull request #4 by jefff (2014-03-28 03:05:58+00:00)
Title: Fix Block Encryption Padding

According to the [xmlenc](http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/Overview.html#sec-Padding) spec, when encrypting data using a Block Encryption Algorithm, a non-zero number of arbitrary padding bytes should be added plus a byte that specifies the total number of bytes added. This differs from the default behavior of the node.js crypto library's padding which specifies that all added bytes must have the value of the total number of bytes added. This causes some valid XML files to fail to decrypt because they use random data for all but the last byte.

This change implements the behavior specified by xmlenc for both `aes128-cbc` and `aes256-cbc` and removes the now unneeded hack for `aes128-cbc`. It also adds a test for this case that fails with the old code.