Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Change faceID generation

laurenspriem8c6bb305788a
diff --git a/mobile/lib/services/machine_learning/face_ml/face_detection/detection.dart b/mobile/lib/services/machine_learning/face_ml/face_detection/detection.dart
index 5a3d126063..b1f7a9bcd5 100644
--- a/mobile/lib/services/machine_learning/face_ml/face_detection/detection.dart
+++ b/mobile/lib/services/machine_learning/face_ml/face_detection/detection.dart
@@ -1,7 +1,5 @@
-import 'dart:convert' show utf8;
import 'dart:math' show sqrt, pow;
import 'dart:ui' show Size;
-import 'package:crypto/crypto.dart' show sha256;
abstract class Detection {
final double score;
@@ -288,11 +286,10 @@ class FaceDetectionRelative extends Detection {
// Convert the bounding box values to string and concatenate
final String rawID = "${xMin}_${yMin}_${xMax}_$yMax";
- // Hash the concatenated string using SHA256
- final digest = sha256.convert(utf8.encode(rawID));
+ final faceID = fileID.toString() + '_' + rawID.toString();
// Return the hexadecimal representation of the hash
- return fileID.toString() + '_' + digest.toString();
+ return faceID;
}
/// This method is used to generate a faceID for a face detection that was manually added by the user.