Exemplo n.º 1
0
        private ProtectedString?FindAccessTokenIn(PwDatabase database)
        {
            var results = new PwObjectList <PwEntry>();

            database.RootGroup.SearchEntries(new SearchParameters
            {
                SearchInStringNames = true,
                ComparisonMode      = StringComparison.InvariantCultureIgnoreCase,
                SearchString        = this.config.AccessTokenStringKey
            }, results);

            PwEntry?entry = results.FirstOrDefault(e => e.Strings.Exists(this.config.AccessTokenStringKey));

            return(entry?.Strings.Get(this.config.AccessTokenStringKey));
        }