how did irene adler tell sherlock the code
A Scandal in Belgravia On Christmas Eve, Sherlock learns via text that Adler has sent him her phone, which requires an unknown password, and realises she will be found dead; her mutilated body is later found and identified. A week later, on New Year's Eve, an intermediary contacts John and takes him to Battersea Power Station. John is surprised to find Adler, who faked her death to shake off her pursuers. Sherlock, having followed John, learns of Adler's survival. Sherlock returns home to find Neilson's team holding his landlady Mrs. Hudson (Una Stubbs) hostage. Sherlock saves her and throws Neilson out a window in revenge. Later on, Adler reveals that she is still being hunted and asks Sherlock to decipher a code stolen from an MOD official. He effortlessly cracks the code, revealing it to be a series of airline seat allocation numbers - Adler secretly texts the resulting flight information to Moriarty, who in turn texts Mycroft, revealing that he is now aware of the MOD ploy to fool the terrorists trying to bomb a plane.