adding encryption to xmp_read
fixed merge conflicts