update: fail if length of decode string is not a multiple of 4

Encoding to base64 always produces strings with a length that is a multiple of four.