A computer implemented method for checking the integrity of a document, comprising: - detecting a digital image (818, 200, 402, 502) of at least a portion of a documents with a camera, wherein the document is assigned to a person, wherein the document comprises optically readable, personal data, wherein the digital image depicts at least the personal data; - calculating image reference data by applying an irreversible, information loss-associated computational function to input data, wherein the input data are intensity data of pixels of the digital image or intensity data of pixels of subimages of the digital image, wherein the information loss is at least so great that the image reference data are depersonalised and is at most so great that the image reference data are individual to the document; - calculating further reference data (714, 718) by applying a further irreversible, information loss-associated computational function to further data, wherein the document comprises the further data, wherein the further data are optically detectable, non-personal data (708, 709, 710), wherein the digital image also depicts the further data, wherein the further data comprise one or more graphic elements, wherein the graphic elements have been introduced into or applied onto the document according to a production-related error tolerance; - storing the image reference data (822, 832) of the document in a database; and - storing the further reference data (714, 718) in the database; characterised in that the calculation of the further reference data comprises: • performing an image analysis to determine the value and optionally also position data for each of the one or more graphic elements on the document, wherein the precision of the value determination and the optionally performed position data determination is greater than the production-related error tolerance; and • using the values and optionally also the position data as the further reference data. - detecting a digital image (818, 200, 402, 502) of at least a portion of a documents with a camera, wherein the document is assigned to a person, wherein the document comprises optically readable, personal data, wherein the digital image depicts at least the personal data; - calculating image reference data by applying an irreversible, information loss-associated computational function to input data, wherein the input data are intensity data of pixels of the digital image or intensity data of pixels of subimages of the digital image, wherein the information loss is at least so great that the image reference data are depersonalised and is at most so great that the image reference data are individual to the document; - calculating further reference data (714, 718) by applying a further irreversible, information loss-associated computational function to further data, wherein the document comprises the further data, wherein the further data are optically detectable, non-personal data (708, 709, 710), wherein the digital image also depicts the further data, wherein the further data comprise one or more graphic elements, wherein the graphic elements have been introduced into or applied onto the document according to a production-related error tolerance; - storing the image reference data (822, 832) of the document in a database; and - storing the further reference data (714, 718) in the database; • performing an image analysis to determine the value and optionally also position data for each of the one or more graphic elements on the document, wherein the precision of the value determination and the optionally performed position data determination is greater than the production-related error tolerance; and • using the values and optionally also the position data as the further reference data.