Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Thunderbird/app-metadata/com.fsck.k9/nn/   (Thunderbird Version 5.6©)  Datei vom 22.9.2026 mit Größe 24 B image not shown  

SSL CallIDTests.swift   Sprache: JAVA

 

import Foundation
import ThreemaEssentials
import XCTest

@testable import GroupCalls

final class CallIDTests: XCTestCase {
    /// **Protocol Step: Group Call ID Derivation** The Call ID is derived from the group identity and the call start
    /// data. Changing it breaks interoperability with all other clients, thus it is pinned to a known answer.
    func testCallIDDerivationMatchesKnownAnswer() throws {
        // Generated by a known good version
        let goldVal = "3b922298c2ad04a5fbef3dfa8270059ee8552789f7194aacb65a3c0e70f79607"

        let creatorIdentity = ThreemaIdentity("ECHOECHO")
        let groupIdentity = GroupIdentity(id: Data(repeating: 0x00, count: 8), creator: creatorIdentity)
        let gck = Data(repeating: 0x01, count: 32)
        let sfuBaseURL = URL(string: "sfu.threema.test")!

        let groupCallStartData = GroupCallStartData(protocolVersion: 0, gck: gck, sfuBaseURL: sfuBaseURL)
        
        let callID = try XCTUnwrap(try? GroupCallID(
            groupIdentity: groupIdentity,
            callStartData: groupCallStartData,
            dependencies: MockDependencies().create()
        ))
        
        XCTAssertEqual(callID.bytes.hexEncodedString(), goldVal)
    }
}

Messung
CHZG
888910092

¤ Dauer der Verarbeitung: 0.7 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland