Skip to content

Add E2EE example, style changes, more tests#583

Merged
boks1971 merged 1 commit intolivekit:mainfrom
skheyfets-asapp:sk_encryption_example
Dec 19, 2024
Merged

Add E2EE example, style changes, more tests#583
boks1971 merged 1 commit intolivekit:mainfrom
skheyfets-asapp:sk_encryption_example

Conversation

@skheyfets-asapp
Copy link
Copy Markdown
Contributor

  • Addressed code style comments
  • Switched to require testifiy package in encryption tests
  • Refactored and added encryption utilities with ability to reuse AES cipher
  • Added echo example with E2EE support (audio decrypted and reencrypted before sending back)
  • Added benchmark tests for encryption utilities (results from dev machine below)
goos: darwin
goarch: amd64
pkg: github.com/livekit/server-sdk-go/v2
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkDecryptAudioNewCipher-12                1781293               603.1 ns/op          1104 B/op          6 allocs/op
BenchmarkDecryptAudioCachedCipher-12             2778477               429.1 ns/op           592 B/op          5 allocs/op
BenchmarkEncryptAudioCachedCipher-12             1287099               884.3 ns/op           632 B/op          6 allocs/op
BenchmarkEncryptAudioNewCipher-12                1080866              1035 ns/op            1144 B/op          7 allocs/op

@davidzhao davidzhao requested a review from boks1971 December 18, 2024 16:54
Copy link
Copy Markdown
Contributor

@boks1971 boks1971 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Guess not a huge performance win, but a sizeable one!

Copy link
Copy Markdown
Contributor

@boks1971 boks1971 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this @skheyfets-asapp . I will merge this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants