move functionality to an encryptor
fix config bug