diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c7251e..4877db6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog -------------------------------------------- +[1.2.0] - 2024-04-08 + +* feat: add keyRingSize/discardFrameWhenCryptorNotReady to KeyProviderOptions. + [1.1.2] - 2023-09-14 * Add more frame cryptor api. diff --git a/lib/src/frame_cryptor.dart b/lib/src/frame_cryptor.dart index 4308dd1..6b912d1 100644 --- a/lib/src/frame_cryptor.dart +++ b/lib/src/frame_cryptor.dart @@ -16,12 +16,19 @@ class KeyProviderOptions { required this.ratchetWindowSize, this.uncryptedMagicBytes, this.failureTolerance = -1, + this.keyRingSize = 16, + this.discardFrameWhenCryptorNotReady = false, }); bool sharedKey; Uint8List ratchetSalt; Uint8List? uncryptedMagicBytes; int ratchetWindowSize; int failureTolerance; + + /// key ring size should be between 1 and 255 + /// default is 16 + int keyRingSize; + bool discardFrameWhenCryptorNotReady; Map toJson() { return { 'sharedKey': sharedKey, @@ -30,6 +37,8 @@ class KeyProviderOptions { 'uncryptedMagicBytes': uncryptedMagicBytes, 'ratchetWindowSize': ratchetWindowSize, 'failureTolerance': failureTolerance, + 'keyRingSize': keyRingSize, + 'discardFrameWhenCryptorNotReady': discardFrameWhenCryptorNotReady, }; } } diff --git a/pubspec.yaml b/pubspec.yaml index e01fe53..95053ba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: webrtc_interface description: WebRTC Interface for Dart-Web/Flutter. -version: 1.1.2 +version: 1.2.0 homepage: https://flutter-webrtc.org environment: