Sesame-Server/Sources/App/API/SignedMessage+Size.swift

16 lines
236 B
Swift
Raw Normal View History

2023-12-08 12:39:10 +01:00
import Foundation
#if canImport(CryptoKit)
import CryptoKit
#else
import Crypto
#endif
extension SignedMessage {
/// The length of a message in bytes
static var size: Int {
SHA256.byteCount + Message.size
}
}