mirror of
https://github.com/signalapp/libsignal.git
synced 2026-04-25 17:25:18 +02:00
- Java: org.whispersystems:signal-client-java ->
org.signal:libsignal-client
- Java: org.whispersystems:signal-client-android ->
org.signal:libsignal-android
- Java: org.whispersystems:libsignal-server ->
org.signal:libsignal-server
- Swift: SignalClient -> LibSignalClient
- NPM: @signalapp/signal-client -> @signalapp/libsignal-client
- Repository: github.com/signalapp/libsignal-client ->
github.com/signalapp/libsignal
40 lines
1.1 KiB
Swift
40 lines
1.1 KiB
Swift
//
|
|
// Copyright 2020-2021 Signal Messenger, LLC.
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
//
|
|
|
|
import Foundation
|
|
import SignalFfi
|
|
|
|
public class PniCredentialPresentation: ByteArray {
|
|
|
|
public required init(contents: [UInt8]) throws {
|
|
try super.init(contents, checkValid: signal_pni_credential_presentation_check_valid_contents)
|
|
}
|
|
|
|
public func getAciCiphertext() throws -> UuidCiphertext {
|
|
return try withUnsafePointerToSerialized { contents in
|
|
try invokeFnReturningSerialized {
|
|
signal_pni_credential_presentation_get_aci_ciphertext($0, contents)
|
|
}
|
|
}
|
|
}
|
|
|
|
public func getPniCiphertext() throws -> UuidCiphertext {
|
|
return try withUnsafePointerToSerialized { contents in
|
|
try invokeFnReturningSerialized {
|
|
signal_pni_credential_presentation_get_pni_ciphertext($0, contents)
|
|
}
|
|
}
|
|
}
|
|
|
|
public func getProfileKeyCiphertext() throws -> ProfileKeyCiphertext {
|
|
return try withUnsafePointerToSerialized { contents in
|
|
try invokeFnReturningSerialized {
|
|
signal_pni_credential_presentation_get_profile_key_ciphertext($0, contents)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|