A kind of method of locking SIM card on mobile phone
Technical field
The present invention relates to wireless communication technology field, relate in particular to a kind of method of locking SIM card on mobile phone.
Background technology
Now, mobile phone become people work the life in requisite communication tool.The cellphone subscriber tends to store bulk information in mobile phone, such as the contact person, and message registration, short message, photo etc.Yet in a single day mobile phone is lost, and that causes is not only loss on the property, and the leakage of information on the mobile phone will bring many stealthy risks.The contact number that utilizes on the mobile phone to be stored such as the lawless person carries out various informative swindle, may bring property loss to the mobile phone person's of losing relatives and friends.For another example, some privacy notes, leaking of photo will bring infinite worry to the party.The cellphone subscriber who has even with on important informations such as bank account storages and the mobile phone sows the seeds of trouble in the future especially.
If mobile phone can intelligent locking SIM card, and according to current SIM card whether locking SIM is opened different functions, even mobile phone is lost like this,, just can reduce potential risk significantly as long as locked SIM card.
Summary of the invention
In order to address the above problem, the invention provides a kind of method of locking SIM card on mobile phone, this method comprises the following steps:
(1) whether by the start of start key, detecting has SIM card, if having, changes step (2); If do not have, then there is not the SIM card start.
(2) whether there is ciphertext in the detection of handset,, changes step (3) if having; If do not have, IMSI sign indicating number in the reading SIM card and the IMEI sign indicating number in the mobile phone generate ciphertext through cryptographic algorithm respectively, and preserve the ciphertext that generates in mobile phone;
(3) resolve ciphertext, draw the IMSI sign indicating number in the ciphertext;
(4) the IMSI sign indicating number in the reading SIM card;
(5) whether the IMSI sign indicating number that parses from ciphertext of contrast is consistent with the IMSI card that reads from SIM card, if unanimity, normal boot-strap; If inconsistent, shutdown automatically.
The method of locking SIM card provided by the present invention, convenient and simple, be easy to realize having stronger versatility, after mobile phone is lost,, can greatly protect the mobile phone owner of lost property's interests by locking SIM card.
Description of drawings
Fig. 1 is the flow chart of locking SIM card of the present invention.
Embodiment
The invention will be further elaborated below in conjunction with accompanying drawing.
As shown in Figure 1, the method for a kind of locking SIM card on mobile phone provided by the present invention may further comprise the steps:
(1) whether by the start of start key, detecting has SIM card, if having, changes step (2); If do not have, then there is not the SIM card start.
(2) whether there is ciphertext in the detection of handset,, changes step (3) if having; If do not have, IMSI sign indicating number in the reading SIM card and the IMEI sign indicating number in the mobile phone generate ciphertext through cryptographic algorithm respectively, and preserve the ciphertext that generates in mobile phone;
(3) resolve ciphertext, draw the IMSI sign indicating number in the ciphertext;
(4) the IMSI sign indicating number in the reading SIM card;
(5) whether the IMSI sign indicating number that parses from ciphertext of contrast is consistent with the IMSI card that reads from SIM card, if unanimity, normal boot-strap; If inconsistent, shutdown automatically.
As mentioned above, method provided by the present invention comprises the process of locking SIM card on mobile phone, and judge whether process after blocking into locked SIM card.
After mobile phone was opened, whether preferential detection existed SIM card.If there is SIM card, then according to whether existing ciphertext to lock the SIM card of current insertion mobile phone in the mobile phone.If there is not ciphertext in the mobile phone, mobile phone needs mutual with SIM card, and unique IMEI sign indicating number of IMSI sign indicating number in the reading SIM card and mobile phone correspondence generates ciphertext by cryptographic algorithm then, and is saved among the flash of mobile phone, and so far SIM card is locked.
After storing the mobile phone unlatching of ciphertext, can preferential detection whether there be SIM card equally.If there is SIM card, then according to the ciphertext in the mobile phone, parse corresponding IMSI sign indicating number and IMEI sign indicating number, and with mobile phone in current SIM card mutual, read the IMSI sign indicating number of current SIM card, and the IMSI sign indicating number that will parse from ciphertext and the IMSI that reads from SIM card stick into the row contrast, confirm whether locked SIM card of current SIM card, if the SIM card of locking, i.e. comparing result unanimity, normal boot-strap mobile phone then, otherwise close the mobile phone function corresponding automatically.
By the foregoing description, the object of the invention is by in full force and effect having reached.The personage who is familiar with this skill should be understood that the content that the present invention includes but be not limited to describe in the top embodiment.Any modification that does not depart from function of the present invention and structural principle all will be included in the scope of claims.