Replies: 9 comments
-
When CryptoSwift was created, Swift didn't have a Foundation. Then I added |
Beta Was this translation helpful? Give feedback.
-
Worth investigating, looking at where we're standing right now. How do you feel about adding, potentially heuristic, wrappers to the existing API, for example: public init(key: Data, blockMode: BlockMode, padding: Padding = .pkcs7) throws {
try init(key: Array(key), blockMode: blockMode, padding: padding)
} Is it worth working that into a PR, or is that never a direction you'd like to take CryptoSwift? |
Beta Was this translation helpful? Give feedback.
-
I think Xcode will just go banana with these overloads tbh, but give it a try, and see how it works for your own maybe |
Beta Was this translation helpful? Give feedback.
-
Just curious, but shouldn't swift 5.4 allow that kind of overload now? |
Beta Was this translation helpful? Give feedback.
-
@Craz1k0ek Having initializers with |
Beta Was this translation helpful? Give feedback.
-
@nathanfallet according to the SPM specification, that shouldn't matter |
Beta Was this translation helpful? Give feedback.
-
@Craz1k0ek Then what about replacing |
Beta Was this translation helpful? Give feedback.
-
no. Data on Apple platforms is backed by ObjC NSData and this is the last thing I want to deal with. There's nothing wrong with [UInt8]. Also, the |
Beta Was this translation helpful? Give feedback.
-
It appears the owner of CryptoSwift is strongly opinionated about the |
Beta Was this translation helpful? Give feedback.
-
Swift's
Data
struct is, in my opinion, a better way to represent binary data, such as keys, cipher texts and others. Most common Swift functions useData
(thinkURLSession
,String.data(using:)
,Codable
). I would like to see a transition from theArray<UInt8>
to theData
type when possible. This can be implemented without breaking existing functionality.Beta Was this translation helpful? Give feedback.
All reactions