Integrated recrypting into standard write procedures