To provide a method for collation of a key which prevents key code information from vanishing or deteriorating when the key is exposed to electromagnetic disturbance, and enables invariably-exact collation of the key.
As to a plurality of keys managed as one key group, three- dimensional shape data on the key sides whereon continuous or discontinuous indent parts for the key code information are formed are measured by a noncontact type three-dimensional shape measuring means. The data are inputted to an arithmetic processing means and converted into two-dimensional key code data wherefrom the data on the depth direction are omitted, and the two-dimensional key code data on each key are stored in one database. When the key is used for a key-using device such as an electric lock, image information on the key side of the key is read as two-dimensional image data by a two-dimensional scanner means and these data are collated by an image data collating means with the two-dimensional key code data stored in the database. When the two-dimensional key code data conforming thereto exist in the database, a drive signal is outputted to the key-using device.