Comments (10)
This is turning out to be really difficult. The implementation is done, but with a nasty hack involving module maps to include CommonCrypto, which is what I use to calculate the MD5.
I'm considering either waiting until Swift has a MD5 function, or using a simpler hashing method.
from hanekeswift.
Maybe Fowler–Noll–Vo.
from hanekeswift.
Maybe https://gist.github.com/pietbrauer/2205b5c9986a9d886b00
from hanekeswift.
Yeah, something like that is what I used initially. The problem is using the C library CommonCrypto in a Swift framework.
FNV can be implemented without external dependencies.
from hanekeswift.
Oh, I didn't realize he's using CommonCrypto there, sorry. Yeah, then FNV could be the solution 😄
from hanekeswift.
Work in progress in this branch.
I'm freeing this issue for now. Might return to it later (Beta 7?).
from hanekeswift.
What's the status on this? Probably we could check this out https://github.com/krzyzanowskim/CryptoSwift/blob/master/CryptoSwift/MD5.swift
from hanekeswift.
I was waiting for Apple to add the CommonCrypto module, but we can also use this (assuming it actually works). Nice find!
from hanekeswift.
murmur hash might be a good solution for this. https://github.com/jwerle/murmurhash.c is an example of this and there are 64 bit versions of this as well, all of them CommonCrypto free
from hanekeswift.
Thanks @madninja. I decided to use CryptoSwift as I'm more familiar with MD5.
from hanekeswift.
Related Issues (20)
- Update Cocoapods Specs Repo HOT 3
- Release of version 1.1 for swift 4
- I cant search 0.11.1 in pods HOT 1
- why version of cocoapods not latest? HOT 2
- Module compiled with Swift 4.0.3 cannot be imported in Swift 4.1.2
- Deprecations
- Cannot compile: Neither 0.11.0 or 0.11.1 available via cocoapods HOT 8
- Heneke Swift with alamofire
- RIP HOT 2
- Can't integrate updated version of library through pods which is supporting to swift 4.2 version HOT 4
- asdfasdf
- Cannot build on Swift 4 HOT 1
- crach on ios 12 and swift 5
- Attaching Auth Headers on hnk_setImageFromURL
- Hi Swift5.1 HOT 3
- Swift Package Manager Integration
- File path URL HOT 1
- Troubleshooting when success is not success
- Compiling with carthage not possible with Xcode 12.0 HOT 1
- Package.swift not included in any release HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hanekeswift.