Apparatus for generating immune database of mobile handheld device and method using the same

An immunity database generation device by generating the immunity database having a fixed size in a mobile terminal and a method thereof are provided to generate the immunity database having the size fit to a range of a target size and reduce battery consumption of the mobile terminal while keeping reliability for detecting a cracking code. An immunity database generation device comprise: a data feature extractor(120) extracting data features from selected data; a similarity calculator(130) computing similarity between the data features and pool features selected from generated random pool features; an immunity database selector(140) generating an immunity database based on a computed similarity value; and an immunity database manager(180) managing the immunity database to include the size of the immunity database to a range of a target size.