Synthesis, characterization and electrochemical properties of a compact titanium dioxide layer