This all looks good...we can add validation for 'aes' as the algorithm type later.