MediaStorage class
Persistent encrypted content-addressed media storage.
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
-
clear(
) → Future< void> -
delete(
String hash) → Future< bool> -
exists(
String hash) → bool -
get(
String hash) → Future< Uint8List?> - Returns the decrypted bytes of a media file by content hash.
-
getFile(
String hash) → File? -
init(
) → Future< void> - Initializes the storage directory and media encryption key.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
String hash, List< int> bytes) → Future<File> - Encrypts and stores bytes under the content hash.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → MediaStorage
-
final
Static Methods
-
isValidHash(
String hash) → bool