UVaultKeys class
Holds the unwrapped master key and hands out per-file ciphers.
Constructors
- UVaultKeys(UAead _master, UStorageBackend _backend)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
create(
String path, {int chunkSize = defaultVaultChunkSize}) → Future< UVaultWriter> -
Opens a writer for a new vault file at
path. Supports writes at any offset as long as every chunk is filled by exactly one sequential writer (true for download segments that are aligned to UVaultHeader.chunkSize). -
newFile(
{int chunkSize = defaultVaultChunkSize}) → Future< (UVaultHeader, UAead)> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openFile(
UVaultHeader header) → Future< UAead> -
plainLength(
String path) → Future< int> -
read(
String path, {int start = 0, int? end}) → Stream< Uint8List> -
Decrypts
[start, end)of the plaintext, touching only the chunks that overlap it. -
readHeader(
String path) → Future< UVaultHeader> -
resume(
String path) → Future< UVaultWriter> - Re-opens a partially written vault file to continue a download.
-
toString(
) → String -
A string representation of this object.
inherited
-
verify(
String path) → Future< bool> - Checks every tag. Returns false instead of throwing when the file is damaged.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
load(
UStorageBackend backend) → Future< UVaultKeys> - Loads the master key from the platform key store, creating it on first use. When the platform has no key store the key falls back to a private file under the support bucket.