Browse Source

fix generator default value.

remove-cryptography-dependency
Herbert Poul 5 years ago
parent
commit
5c00d134c3
  1. 8
      lib/src/kdbx_format.dart
  2. 4
      lib/src/kdbx_meta.dart

8
lib/src/kdbx_format.dart

@ -278,11 +278,15 @@ class KdbxBody extends KdbxNode {
}
class KdbxFormat {
static KdbxFile create(Credentials credentials, String name) {
static KdbxFile create(
Credentials credentials,
String name, {
String generator,
}) {
final header = KdbxHeader.create();
final meta = KdbxMeta.create(
databaseName: name,
generator: 'AuthPass',
generator: generator,
);
final rootGroup = KdbxGroup.create(parent: null, name: name);
final body = KdbxBody.create(meta, rootGroup);

4
lib/src/kdbx_meta.dart

@ -8,11 +8,11 @@ import 'package:xml/xml.dart' as xml;
class KdbxMeta extends KdbxNode {
KdbxMeta.create({
@required String databaseName,
String generator = 'kdbx.dart',
String generator,
}) : customData = KdbxCustomData.create(),
super.create('Meta') {
this.databaseName.set(databaseName);
this.generator.set(generator);
this.generator.set(generator ?? 'kdbx.dart');
}
KdbxMeta.read(xml.XmlElement node)

Loading…
Cancel
Save