[encryption] clean up encryption exceptions

clean up the encryption exception, add error codes as const and updated the header for all files I touched.