Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use Swift CommonCrypto module to calculate md5 hashes #22

Merged
merged 4 commits into from
Feb 11, 2020

Conversation

sherwinski
Copy link
Contributor

@sherwinski sherwinski commented Jan 31, 2020

CommonCrypto is Apple's Open Source cryptography library, which we leverage for generating our URL signature hashes. Previously, we relied on importing the C version of the library and hooking it up to generate hashes in our mostly-swift code base.

This PR refactors the library to use the Swift CommonCrypto module, which ships with XCode 10+ out of the box. This won't result in any difference in this library's behavior. However, this change will help immensely with eventually supporting this project on Swift Package Manager, which has a difficult time handling Swift + ObjC mixed codebases, as well as yielding a cleaner codebase overall. The solution to port over the MD5 function to pure swift was a suggestion from #21.

Copy link
Contributor Author

@sherwinski sherwinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @ikait, was hoping you could give a look over these changes and see if porting over the MD5 generation to Swift in this way makes sense. I also had a separate question about Swift projects that I wasn't able to find the answer for online. Thank you!

Sources/ImgixSwift-Umbrella-Header.h Show resolved Hide resolved
Sherwin H added 2 commits February 3, 2020 09:12
    - enable nonlocalization
    - enable base internalization
    - migrate deprecated 'English.lproj' localization
    - set macOS scheme @objc inference setting to 'default'
    - upgrade iOS and tvOS schemes to swift 5
    - use default architectures when testing
@sherwinski sherwinski merged commit a9c43c2 into master Feb 11, 2020
@sherwinski sherwinski deleted the md5-using-swift branch February 11, 2020 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant