This paper deals with some of the issues raised by the criminal protection of privacy in the face of the risks posed by the use of technological media and digitalisation. Specifically, it focuses on the study of the judicial treatment of the offences consisting of a "non-consensual use of technological means of sound or image recording" and "the unauthorised access to another person ' s personal or family data, which are recorded in a computer, electronic or telematic files or media". This paper deals firstly with the concept of privacy as an interest protected by the law and defends a restrictive interpretation of the scope of protection that should correspond to criminal law. Secondly, an analysis of the current judicial doctrine of some of the problems raised by the regulation of the criminal conducts under study is presented. This analysis shows, on the one hand, a tendency of judicial bodies to restrict the scope of criminal protection, but, on the other hand, a lack of clarity about the scope of criminal conduct, as well as certain inconsistencies, largely due to the difficulties arising from the deficient regulation of these offences in the Criminal Code. The paper concludes with a lege ferenda proposal for the revision of the offences regulated in Article 197 of the Criminal Code, which amends the current defective wording and restricts criminal protection to conducts that represent a serious infringement of privacy, leaving for the civil and administrative sphere all that which, in accordance with the principles of minimum intervention and proportionality, should remain outside the scope of criminal law.