Exploring Data Encryption and Sorting Algorithms