Skip to content

Commit

Permalink
Possible fix for recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwillian0 committed Apr 14, 2024
1 parent c56e633 commit ec25a53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.16.9
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
Expand Down
6 changes: 3 additions & 3 deletions lib/findMy/decrypt_reports.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DecryptReports {

final ephemeralKeys = reports.map((report) {
final payloadData = report.payload;
final ephemeralKeyBytes = payloadData.sublist(5, 62);
final ephemeralKeyBytes = payloadData.sublist(payloadData.length - 16 - 10 - 57, payloadData.length - 16 - 10);
return ephemeralKeyBytes;
}).toList();

Expand Down Expand Up @@ -52,8 +52,8 @@ class DecryptReports {
final derivedKey = _kdf(sharedKeys[index], ephemeralKeys[index]);
final payloadData = report.payload;
_decodeTimeAndConfidence(payloadData, report);
final encData = payloadData.sublist(62, 72);
final tag = payloadData.sublist(72, payloadData.length);
final encData = payloadData.sublist(payloadData.length - 16 - 10, payloadData.length - 16);
final tag = payloadData.sublist(payloadData.length - 16, payloadData.length);
final decryptedPayload = _decryptPayload(encData, derivedKey, tag);
final locationReport = _decodePayload(decryptedPayload, report);
return locationReport;
Expand Down

0 comments on commit ec25a53

Please sign in to comment.