SwiftGCM icon indicating copy to clipboard operation
SwiftGCM copied to clipboard

XCODE 10 Modifications

Open PhumzileK opened this issue 6 years ago • 1 comments

Hi I came across your GCM implementation and am attempting to use it to create a JWE.

  1. XCODE 10 doesn't need a CommonCrypto bridging header. So import CommonCrypto is all that's needed now.
  2. 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.

PhumzileK avatar Dec 06 '18 12:12 PhumzileK

Thanks for detailing your changes, I'll update when possible!

luke-park avatar Dec 06 '18 20:12 luke-park