TomKeyMaterial class

The key material for one encrypted container: a passphrase, a key file, or both.

The three fields sit at two levels:

  • passphrase and keyFileBytes are the material. They open a file.
  • keyFileLocator is a pointer to material. It is what settings store, because a path is not the secret — the bytes are, and the bytes are never stored.

So material read back from settings routinely names a key file it has not read. That is isResolvable being false while isEmpty is also false, and keeping the two apart lets a caller skip such an entry at start-up instead of throwing on it.

Constructors

TomKeyMaterial({String? passphrase, Uint8List? keyFileBytes, String? keyFileLocator})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
isEmpty → bool
Whether this states nothing at all — the "no key saved" case.
no setter
isResolvable → bool
Whether enough material (not merely a pointer to it) is present to open a file.
no setter
keyFileBytes → Uint8List?
The key file's contents — present only once something has read them.
final
keyFileLocator → String?
Where the key file lives (a storage locator), when it is known.
final
passphrase → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({String? passphrase, Uint8List? keyFileBytes, String? keyFileLocator}) → TomKeyMaterial
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requireResolvable() → void
Refuses material that cannot open anything, in the words a caller shows.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited