Printing polarization and phase at the optical diffraction limit: near- and far-field optical encryption