GithubHelp home page GithubHelp logo

joekun / filemd5hash Goto Github PK

View Code? Open in Web Editor NEW
284.0 284.0 71.0 59 KB

Library for computing MD5 hashes of files with small memory usage on iOS and OS X

License: Apache License 2.0

Ruby 2.30% Objective-C 97.70%

filemd5hash's People

Contributors

fuitad avatar joekun avatar tscheepers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filemd5hash's Issues

get the binary representation as NSData

Hi,
[FileHash md5HashOfFileAtPath:myPath] returns the hexadecimal representation of the digest. I would need the 16 bytes binary form, is there any way to get this?
Reason? I need to apply a base64 on the binary data using
[md5ByteStringData base64EncodedStringWithOptions:0]
and put this into a content-md5 HTTP header.
I searched now for a long time and could not find any convenient way to do this.
Any help appreciated.

Cocoapods 0.0.1 is broken.

Cocoapod spec for 0.0.1 is pointing to a specific commit instead of a tag. For some reason (I guess a rebase and push forced) the commit has disappeared from the tree, and now any other podspec relying on this tool can not be installed. Please, update cocoapods to fix the 0.0.1.

Does using a chunk size of 4096 not forego hardware acceleration on iOS?

Does anyone know why 4096 is used as the default chunk size for reading data? According to https://opensource.apple.com/source/CommonCrypto/CommonCrypto-36064/Source/Digest/sha1.c (via http://stackoverflow.com/a/5387310/1011953), SHA1 (and perhaps the other digests) is hardware accelerated if the size of the data it is given is > 4096.

For example, the average of 100 sha1's on a ~1.4MB file on a 9.7" iPad Pro:

chunk size (bytes) time (sec)
4096 0.00042184
8192 0.00039322
12,288 0.00035151
16,384 0.00033951
20,480 0.00035334

Thank you.

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.