mirror of
https://github.com/signalapp/libsignal.git
synced 2026-04-26 01:35:22 +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
32 lines
845 B
Swift
32 lines
845 B
Swift
//
|
|
// Copyright 2020-2021 Signal Messenger, LLC.
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
//
|
|
|
|
import Foundation
|
|
import SignalFfi
|
|
|
|
public class AuthCredentialPresentation: ByteArray {
|
|
|
|
public required init(contents: [UInt8]) throws {
|
|
try super.init(contents, checkValid: signal_auth_credential_presentation_check_valid_contents)
|
|
}
|
|
|
|
public func getUuidCiphertext() throws -> UuidCiphertext {
|
|
return try withUnsafePointerToSerialized { contents in
|
|
try invokeFnReturningSerialized {
|
|
signal_auth_credential_presentation_get_uuid_ciphertext($0, contents)
|
|
}
|
|
}
|
|
}
|
|
|
|
public func getRedemptionTime() throws -> UInt32 {
|
|
return try withUnsafePointerToSerialized { contents in
|
|
try invokeFnReturningInteger {
|
|
signal_auth_credential_presentation_get_redemption_time($0, contents)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|