Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser settings v2 #7

Merged
merged 13 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions bin/kdbx.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ void main(List<String> arguments) {
}

class KdbxCommandRunner extends CommandRunner<void> {
KdbxCommandRunner(String executableName, String description)
: super(executableName, description) {
KdbxCommandRunner(super.executableName, super.description) {
argParser.addFlag('verbose', abbr: 'v');
addCommand(CatCommand());
addCommand(DumpXmlCommand());
Expand Down
18 changes: 9 additions & 9 deletions lib/kdbx.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,12 @@ export 'src/crypto/key_encrypter_kdf.dart'
show KeyEncrypterKdf, KdfType, KdfField;
export 'src/crypto/protected_value.dart'
show ProtectedValue, StringValue, PlainValue;
export 'src/field.dart' show BrowserFieldModel, FormFieldType, FieldStorage;
export 'src/internal/kdf_cache.dart' show KdfCache;
export 'src/kdbx_binary.dart' show KdbxBinary;
export 'src/kdbx_consts.dart';
export 'src/kdbx_custom_data.dart';
export 'src/kdbx_dao.dart' show KdbxDao;
export 'src/kdbx_entry.dart'
show
KdbxEntry,
KdbxKey,
KdbxKeyCommon,
BrowserEntrySettings,
BrowserAutoFillBehaviour,
MatchAccuracy;
export 'src/kdbx_entry.dart' show KdbxEntry, KdbxKey, KdbxKeyCommon;
export 'src/kdbx_exceptions.dart';
export 'src/kdbx_file.dart';
export 'src/kdbx_format.dart' show KdbxBody, MergeContext, KdbxFormat;
Expand All @@ -37,4 +29,12 @@ export 'src/kdbx_object.dart'
ChangeEvent,
KdbxNodeContext;
export 'src/kdbx_var_dictionary.dart' show VarDictionary;
export 'src/kee_vault_model/browser_entry_settings.dart'
show BrowserEntrySettings;
export 'src/kee_vault_model/entry_matcher.dart';
export 'src/kee_vault_model/entry_matcher_config.dart';
export 'src/kee_vault_model/enums.dart';
export 'src/kee_vault_model/field.dart' show Field;
export 'src/kee_vault_model/field_matcher.dart' show FieldMatcher;
export 'src/kee_vault_model/field_matcher_config.dart';
export 'src/utils/byte_utils.dart' show ByteUtils;
2 changes: 1 addition & 1 deletion lib/src/crypto/protected_salt_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ProtectedSaltGenerator {
}

class ChachaProtectedSaltGenerator extends ProtectedSaltGenerator {
ChachaProtectedSaltGenerator._(StreamCipher state) : super._(state);
ChachaProtectedSaltGenerator._(super.state) : super._();

factory ChachaProtectedSaltGenerator.create(Uint8List key) {
final hash = sha512.convert(key);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/crypto/protected_value.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class PlainValue implements StringValue {
}

class ProtectedValue extends PlainValue {
ProtectedValue(String text) : super(text);
ProtectedValue(super.text);

factory ProtectedValue.fromString(String value) {
return ProtectedValue(value);
Expand Down
8 changes: 4 additions & 4 deletions lib/src/kdbx_custom_data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ class KdbxObjectCustomData extends KdbxNode {
: _data = {},
super.create(KdbxXml.NODE_CUSTOM_DATA);

KdbxObjectCustomData.read(xml.XmlElement node)
KdbxObjectCustomData.read(super.node)
: _data = Map.fromEntries(
node.findElements(KdbxXml.NODE_CUSTOM_DATA_ITEM).map((el) {
final key = el.singleTextNode(KdbxXml.NODE_KEY);
final value = el.singleTextNode(KdbxXml.NODE_VALUE);
return MapEntry(key, value);
})),
super.read(node);
super.read();

final Map<String, String> _data;

Expand Down Expand Up @@ -59,7 +59,7 @@ class KdbxMetaCustomData extends KdbxNode {
: _data = {},
super.create(KdbxXml.NODE_CUSTOM_DATA);

KdbxMetaCustomData.read(xml.XmlElement node)
KdbxMetaCustomData.read(super.node)
: _data = Map.fromEntries(
node.findElements(KdbxXml.NODE_CUSTOM_DATA_ITEM).map((el) {
final key = el.singleTextNode(KdbxXml.NODE_KEY);
Expand All @@ -73,7 +73,7 @@ class KdbxMetaCustomData extends KdbxNode {
: null
));
})),
super.read(node);
super.read();

final Map<String, KdbxMetaCustomDataItem> _data;

Expand Down
3 changes: 1 addition & 2 deletions lib/src/kdbx_deleted_object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:clock/clock.dart';
import 'package:kdbx/src/kdbx_format.dart';
import 'package:kdbx/src/kdbx_object.dart';
import 'package:kdbx/src/kdbx_xml.dart';
import 'package:xml/xml.dart';

class KdbxDeletedObject extends KdbxNode implements KdbxNodeContext {
KdbxDeletedObject.create(this.ctx, KdbxUuid uuid, {DateTime? deletionTime})
Expand All @@ -11,7 +10,7 @@ class KdbxDeletedObject extends KdbxNode implements KdbxNodeContext {
this.deletionTime.set(deletionTime ?? clock.now().toUtc());
}

KdbxDeletedObject.read(XmlElement node, this.ctx) : super.read(node);
KdbxDeletedObject.read(super.node, this.ctx) : super.read();

static const NODE_NAME = KdbxXml.NODE_DELETED_OBJECT;

Expand Down
Loading