class EncryptorService {

	public void initialize(String masterPassword) {
		checkNotNull(masterPassword, "Must provide a master password");
		checkArgument(!masterPassword.isEmpty(), "Must provide a master password");
		synchronized (configurationLock) {
			checkState(!isInitialized(), "Cannot initialize encryption settings more than once");
			checkState(isConfigured(), "Must configure encryption settings before initializing");

			EncryptorSettings encryptorSettings = settingsService.retrieve().getEncryptorSettings();
			if (!encryptorSettings.validateMasterPassword(masterPassword)) {
				throw new InvalidMasterPasswordException();
			}
			encryptorProviderService.setEncryptor(new Encryptor(encryptorSettings, masterPassword));
		}
	}

	@Inject public  EncryptorService(SettingsService settingsService, EncryptorProviderService encryptorProviderService,
			EncryptorListener encryptorListener);

}