Пример #1
0
        public SecretService(string password, string fileLocation)
        {
            _fileAccessService = new FileAccessService(fileLocation);

            _serialisationService = new SerialisationService(
                new CipherService(password),
                _fileAccessService);
        }
Пример #2
0
        public async Task ChangePassword(string newPassword)
        {
            if (string.IsNullOrEmpty(newPassword))
            {
                return;
            }

            await EnsureInitialisation();

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

            await Commit();
        }