mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-24 22:45:19 +00:00
Perf: Add final to classes that are not inherited (#574)
This commit is contained in:
+3
-3
@@ -37,7 +37,7 @@ This three-message pattern provides:
|
||||
#### NoiseEncryptionService
|
||||
The main service managing all Noise operations:
|
||||
```swift
|
||||
class NoiseEncryptionService {
|
||||
final class NoiseEncryptionService {
|
||||
private let staticIdentityKey: Curve25519.KeyAgreement.PrivateKey
|
||||
private let sessionManager: NoiseSessionManager
|
||||
private let channelEncryption = NoiseChannelEncryption()
|
||||
@@ -47,7 +47,7 @@ class NoiseEncryptionService {
|
||||
#### NoiseSession
|
||||
Individual session state for each peer:
|
||||
```swift
|
||||
class NoiseSession {
|
||||
final class NoiseSession {
|
||||
private var handshakeState: NoiseHandshakeState?
|
||||
private var sendCipher: NoiseCipherState?
|
||||
private var receiveCipher: NoiseCipherState?
|
||||
@@ -58,7 +58,7 @@ class NoiseSession {
|
||||
#### NoiseSessionManager
|
||||
Thread-safe session management:
|
||||
```swift
|
||||
class NoiseSessionManager {
|
||||
final class NoiseSessionManager {
|
||||
private var sessions: [String: NoiseSession] = [:]
|
||||
private let sessionsQueue = DispatchQueue(label: "noise.sessions", attributes: .concurrent)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user