Added support for saving encrypted private keys