refactor toxencryptedsave to allow passphrase encryption of arbitrary data
also a minor API change for clarity