Relativistic charged bosons in a magnetic field. I. Wave functions and matrix elements