Skip to content

Commit

Permalink
feat: add keyRingSize/discardFrameWhenCryptorNotReady to KeyProviderO…
Browse files Browse the repository at this point in the history
…ptions.
  • Loading branch information
cloudwebrtc committed Apr 8, 2024
1 parent 51e1279 commit 767eb08
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
9 changes: 9 additions & 0 deletions lib/src/frame_cryptor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, dynamic> toJson() {
return {
'sharedKey': sharedKey,
Expand All @@ -30,6 +37,8 @@ class KeyProviderOptions {
'uncryptedMagicBytes': uncryptedMagicBytes,
'ratchetWindowSize': ratchetWindowSize,
'failureTolerance': failureTolerance,
'keyRingSize': keyRingSize,
'discardFrameWhenCryptorNotReady': discardFrameWhenCryptorNotReady,
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 767eb08

Please sign in to comment.