Updated to use encryption key from appSettings