A police officer who was “infatuated” with her convicted criminal boyfriend has been jailed for sharing sensitive information with him.