The invention discloses a
software security and validity period
verification method and
system, and the method comprises the steps: obtaining hardware data of a host when
software runs; encrypting the hardware data by adopting an
encryption algorithm to obtain a first identification code and a first
verification code corresponding to the first identification code; judging whether the first
verification code is successfully matched with a pre-obtained target verification code or not; if yes, verification is passed, otherwise, dates D are traversed in a date set, the first identification code and the dates D are processed and then encrypted, a second verification code corresponding to each date D is obtained, D belongs to [D1, D2], D is a positive integer, D2 is larger than or equal to D1, D1 is the current date of the
system, and D2 is the
expiration date of the validity period of the
software; judging whether a second verification code matched with the target verification code exists or not; if yes, determining that the verification is passed, and if not, determining that the verification fails. According to the method, additional
encryption hardware is not needed, the cost is reduced, the period is short, and verification of software in environments such as medical scenes which cannot be connected with an external network is facilitated.