majro update
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:xxh3/xxh3.dart';
|
||||
import 'package:fast_equatable/hash.dart';
|
||||
|
||||
extension ImageHash on Image {
|
||||
Future<int?> calculateHash() async {
|
||||
final bytes = await toByteData();
|
||||
if (bytes != null) {
|
||||
final digest = xxh3(bytes.buffer.asUint8List());
|
||||
final byteData = await toByteData();
|
||||
if (byteData != null) {
|
||||
final digest = secureHash(byteData);
|
||||
return digest;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user