Browse Source

allow password of composite key be nullable.

null-safety
Herbert Poul 4 years ago
parent
commit
7721a0ff4e
  1. 4
      lib/src/kdbx_format.dart

4
lib/src/kdbx_format.dart

@ -31,9 +31,9 @@ final _logger = Logger('kdbx.format');
abstract class Credentials { abstract class Credentials {
factory Credentials(ProtectedValue password) => factory Credentials(ProtectedValue password) =>
Credentials.composite(password, null); //PasswordCredentials(password); Credentials.composite(password, null); //PasswordCredentials(password);
factory Credentials.composite(ProtectedValue password, Uint8List? keyFile) => factory Credentials.composite(ProtectedValue? password, Uint8List? keyFile) =>
KeyFileComposite( KeyFileComposite(
password: PasswordCredentials(password), password: password?.let((that) => PasswordCredentials(that)),
keyFile: keyFile == null ? null : KeyFileCredentials(keyFile), keyFile: keyFile == null ? null : KeyFileCredentials(keyFile),
); );

Loading…
Cancel
Save