apple / swift-crypto

Open-source implementation of a substantial portion of the API of Apple CryptoKit suitable for use on Linux platforms.
https://apple.github.io/swift-crypto
Apache License 2.0
1.45k stars 154 forks source link

Add sendable conformance to appropriate types #150

Open jmjauer opened 1 year ago

jmjauer commented 1 year ago

Add Sendable conformance to appropriate types would allow to enabled additional safety checks at compile time. Without it, developers have to guess whether a type is Sendable or not.

Sajjon commented 1 year ago

Ah the by Github listed "mention" was a red herring, I was trying to write "amount: 150" using pound sign, which was a silly thing to do, since I forgot GH lists is a references... Sorry for misleading "mention".

But YES I agree Sendable would be great to have, when safe to mark as such!

Sajjon commented 1 year ago

I see no reason for ECDSASignature to not be Sendable, nor any reason for why all PublicKeys cannot be Sendable.

Lukasa commented 1 year ago

Huh, I thought I commented on this. Regardless: we've heard this feedback internally, thanks for providing it!

Sajjon commented 1 year ago

@Lukasa mind if I submit a PR making PublicKeys Equatable? I know different topic... but IMO falls under non dangerous protocol conformances helping devs :)

Lukasa commented 1 year ago

This is a good suggestion, thanks. As this affects the common API layer between CryptoKit and Swift Crypto, while you can make a PR we will be unable to merge it until an equivalent change ships in CryptoKit.

jmjauer commented 1 year ago

Are the people who maintain CryptoKit the same ones who maintain Swift Crypto - or should I post this suggestion somewhere else?

Lukasa commented 1 year ago

I'm afraid that's not something I can get into detail about, but I will say that filing a request using Feedback Assistant is always valuable.