BACKGROUND OF THE INVENTION The invention relates generally to counterfeit protection for printed and digital documents, packaging and other printed materials, and more particularly to the secure production of encoded images for use in counterfeit protection measures.