Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Threema/GroupCalls/Tests/GroupCallsTests/   (Social Medium ©)  Datei vom 26.9.2026 mit Größe 1 kB image not shown  

Quelle  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
869610093

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.