In a case involving the intersection of technology, privacy rights and law enforcement, the state Supreme Court ruled 4-3 that neither federal nor state laws protected a former Essex County sheriff’s officer, accused of texting and calling the target of a state narcotics investigation on ways to allude apprehension, from disclosing the pass codes to his iPhones.

In a 47-page opinion on Monday, the court’s slim majority ruled in State v. Andrews that the defendant’s rights were not violated under the self-incrimination clause of the Fifth Amendment to the U.S. Constitution, or New Jersey’s common law or statutory protections against self-incrimination, when he was compelled to reveal the pass codes.