Sesame-iOS/Sesame/API/ServerMessage.swift
Christoph Hagen 32b4c8c81a Update API
2023-08-09 16:26:43 +02:00

27 lines
415 B
Swift

import Foundation
import NIOCore
#if canImport(CryptoKit)
import CryptoKit
#else
import Crypto
#endif
struct ServerMessage {
static let authTokenSize = SHA256.byteCount
let authToken: Data
let message: Message
init(authToken: Data, message: Message) {
self.authToken = authToken
self.message = message
}
var encoded: Data {
authToken + message.encoded
}
}