Characterizing high-dimensional optical systems with applications in compressive sensing and quantum data locking