Git Product home page Git Product logo

Comments (10)

hpique avatar hpique commented on August 19, 2024

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.

hpique avatar hpique commented on August 19, 2024

Maybe Fowler–Noll–Vo.

from hanekeswift.

Lascorbe avatar Lascorbe commented on August 19, 2024

Maybe https://gist.github.com/pietbrauer/2205b5c9986a9d886b00

from hanekeswift.

hpique avatar hpique commented on August 19, 2024

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.

Lascorbe avatar Lascorbe commented on August 19, 2024

Oh, I didn't realize he's using CommonCrypto there, sorry. Yeah, then FNV could be the solution 😄

from hanekeswift.

hpique avatar hpique commented on August 19, 2024

Work in progress in this branch.

I'm freeing this issue for now. Might return to it later (Beta 7?).

from hanekeswift.

joanromano avatar joanromano commented on August 19, 2024

What's the status on this? Probably we could check this out https://github.com/krzyzanowskim/CryptoSwift/blob/master/CryptoSwift/MD5.swift

from hanekeswift.

hpique avatar hpique commented on August 19, 2024

I was waiting for Apple to add the CommonCrypto module, but we can also use this (assuming it actually works). Nice find!

from hanekeswift.

madninja avatar madninja commented on August 19, 2024

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.

hpique avatar hpique commented on August 19, 2024

Thanks @madninja. I decided to use CryptoSwift as I'm more familiar with MD5.

from hanekeswift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.