Skip to content

Commit 767eb08

Browse files
committedApr 8, 2024
feat: add keyRingSize/discardFrameWhenCryptorNotReady to KeyProviderOptions.
1 parent 51e1279 commit 767eb08

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed
 

‎CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

33
--------------------------------------------
4+
[1.2.0] - 2024-04-08
5+
6+
* feat: add keyRingSize/discardFrameWhenCryptorNotReady to KeyProviderOptions.
7+
48
[1.1.2] - 2023-09-14
59

610
* Add more frame cryptor api.

‎lib/src/frame_cryptor.dart

+9
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,19 @@ class KeyProviderOptions {
1616
required this.ratchetWindowSize,
1717
this.uncryptedMagicBytes,
1818
this.failureTolerance = -1,
19+
this.keyRingSize = 16,
20+
this.discardFrameWhenCryptorNotReady = false,
1921
});
2022
bool sharedKey;
2123
Uint8List ratchetSalt;
2224
Uint8List? uncryptedMagicBytes;
2325
int ratchetWindowSize;
2426
int failureTolerance;
27+
28+
/// key ring size should be between 1 and 255
29+
/// default is 16
30+
int keyRingSize;
31+
bool discardFrameWhenCryptorNotReady;
2532
Map<String, dynamic> toJson() {
2633
return {
2734
'sharedKey': sharedKey,
@@ -30,6 +37,8 @@ class KeyProviderOptions {
3037
'uncryptedMagicBytes': uncryptedMagicBytes,
3138
'ratchetWindowSize': ratchetWindowSize,
3239
'failureTolerance': failureTolerance,
40+
'keyRingSize': keyRingSize,
41+
'discardFrameWhenCryptorNotReady': discardFrameWhenCryptorNotReady,
3342
};
3443
}
3544
}

‎pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: webrtc_interface
22
description: WebRTC Interface for Dart-Web/Flutter.
3-
version: 1.1.2
3+
version: 1.2.0
44
homepage: https://flutter-webrtc.org
55

66
environment:

0 commit comments

Comments
 (0)
Please sign in to comment.