Fix issue with 0s being padded at the end of a decoded block; added validation phase in test application

Signed-off-by: Dave Poirier <ekscrypto@gmail.com>