Commit Graph

11 Commits

Author SHA1 Message Date
Jordan Rose
279390b4f2 Incremental MAC: Check digest length when initializing ValidatingMac 2025-10-14 16:30:10 -07:00
Jordan Rose
f19815b938 swift: Add a low-level helper invokeFnReturningValueByPointer
...and use it to avoid having to name return types for bridge
functions, which return by out-parameter.
2025-10-14 11:22:22 -07:00
Jordan Rose
9e13263581 Switch to swift-format for formatting instead of swiftformat
swift-format is owned by the Swift project and is generally less
opinionated than swiftformat (but better at formatting to a limited
line length).
2025-06-25 11:24:57 -07:00
Alex Bakon
8e950c4691 Port Swift args, return types from [UInt8] to Data 2025-06-13 15:15:04 -04:00
Alex Konradi
33b8e9c3d8 Use strong pointer types for Swift bridge
Wrap the raw pointers exposed across the bridge as named types that approximate 
Swift's OpaquePointer?. Parameterize NativeHandleOwner with the native handle 
type.
2024-12-18 10:00:07 -05:00
moiseev-signal
37391438c9 incremental: Make chunk size value accessible on iOS 2024-10-25 09:38:26 -07:00
Jordan Rose
e2b453fb18 swift: Initial audit for Sendable
- All public Swift-defined structs except CdsiLookupResponse,
  which wraps LookupResponseEntryList, which can *probably* be made
  Sendable but I didn't spend time on it.

- All public Swift-defined enums except those being used purely as
  namespaces.

- All zkgroup types, since they are immutable and can be serialized
  and deserialized to send them anyway

- ServiceId and its subclasses, an immutable class hierarchy

- ProtocolAddress, PinHash, SenderCertificate and ServerCertificate,
  and all public and private Key types, immutable wrappers around
  immutable Rust objects

More of our wrapper types could be made Sendable as well if there's a
need to. See CODING_GUIDELINES for more info.
2024-10-23 13:10:16 -07:00
moiseev-signal
58f43107ab Enforce Swift code formatting 2024-02-23 09:56:38 -08:00
Jordan Rose
25ddb75fd8 Appease swiftlint by writing cases on separate lines 2023-10-31 13:27:17 -07:00
moiseev-signal
6abe26a0c1 Improve incremental MAC API 2023-08-31 15:28:39 -07:00
moiseev-signal
2b46ae1e85 Implement incremental MAC 2023-05-09 12:29:25 -07:00