Added functions to create encrypted keystore and place in file.