示例#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();
        }