Skip to content

fix: sif detection for e2ee #788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
android {
namespace = "io.livekit.example"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
ndkVersion = "27.0.12077973"

compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
Expand Down
7 changes: 4 additions & 3 deletions web/e2ee.cryptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,7 @@ class FrameCryptor {
var magicBytes = keyOptions.uncryptedMagicBytes!;
if (srcFrame.buffer.length > magicBytes.length + 1) {
var magicBytesBuffer = srcFrame.buffer.sublist(
srcFrame.buffer.length - magicBytes.length - 1,
srcFrame.buffer.length - 1);
srcFrame.buffer.length - magicBytes.length, srcFrame.buffer.length);
logger.finer(
'magicBytesBuffer $magicBytesBuffer, magicBytes $magicBytes');
if (magicBytesBuffer.toString() == magicBytes.toString()) {
Expand Down Expand Up @@ -681,7 +680,9 @@ class FrameCryptor {

logger.fine(
'decodeFunction[CryptorError.kOk]: decryption success kind $kind, headerLength: $headerLength, timestamp: ${srcFrame.timestamp}, ssrc: ${srcFrame.ssrc}, data length: ${srcFrame.buffer.length}, decrypted length: ${finalBuffer.toBytes().length}, keyindex $keyIndex iv $iv');
} catch (e) {
} catch (e, s) {
logger.info('decodeFunction[CryptorError.kDecryptError]: $e, $s');

if (lastError != CryptorError.kDecryptError) {
lastError = CryptorError.kDecryptError;
postMessage({
Expand Down
Loading