SwiftGCM
SwiftGCM copied to clipboard
XCODE 10 Modifications
Hi I came across your GCM implementation and am attempting to use it to create a JWE.
- XCODE 10 doesn't need a CommonCrypto bridging header. So import CommonCrypto is all that's needed now.
- I had to modify the function encryptBlock because you are you were using ct inside its own withUnsafeMutableBytes block(which raised the Overlapping accesses error). So I created a countCT to hold the ct.count and then passed it in instead of referring to ct.count. It fixed the compile error.
You might want to update the project and readme with that.
Thanks for the implementation. I was on the verge of coding it from scratch as I needed this specific algorithm for encryption.
Thanks for detailing your changes, I'll update when possible!