Turns out element ordering is important, and wrong b64 function
used.