Exemplo n.º 1
0
        public SecretService(string password, string fileLocation)
        {
            _fileAccessService = new FileAccessService(fileLocation);

            _serialisationService = new SerialisationService(
                new CipherService(password),
                _fileAccessService);
        }
Exemplo n.º 2
0
        public async Task ChangePassword(string newPassword)
        {
            if (string.IsNullOrEmpty(newPassword))
            {
                return;
            }

            await EnsureInitialisation();

            _serialisationService = new SerialisationService(
                new CipherService(newPassword),
                _fileAccessService);

            await Commit();
        }