{"action":"created","issue":{"url":"https://api.github.com/repos/kikito/md5.lua/issues/8","repository_url":"https://api.github.com/repos/kikito/md5.lua","labels_url":"https://api.github.com/repos/kikito/md5.lua/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/kikito/md5.lua/issues/8/comments","events_url":"https://api.github.com/repos/kikito/md5.lua/issues/8/events","html_url":"https://github.com/kikito/md5.lua/issues/8","id":163335672,"number":8,"title":"Add incremental MD5 function (feature request)","user":{"login":"pgimeno","id":4267396,"avatar_url":"https://avatars.githubusercontent.com/u/4267396?v=3","gravatar_id":"","url":"https://api.github.com/users/pgimeno","html_url":"https://github.com/pgimeno","followers_url":"https://api.github.com/users/pgimeno/followers","following_url":"https://api.github.com/users/pgimeno/following{/other_user}","gists_url":"https://api.github.com/users/pgimeno/gists{/gist_id}","starred_url":"https://api.github.com/users/pgimeno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgimeno/subscriptions","organizations_url":"https://api.github.com/users/pgimeno/orgs","repos_url":"https://api.github.com/users/pgimeno/repos","events_url":"https://api.github.com/users/pgimeno/events{/privacy}","received_events_url":"https://api.github.com/users/pgimeno/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-01T07:27:29Z","updated_at":"2016-07-15T14:50:37Z","closed_at":"2016-07-15T14:50:37Z","body":"The suggestion by @stejacob in https://github.com/kikito/md5.lua/issues/4#issuecomment-158112037 would not have fixed the issue reported there, but it is sound. Usual C implementations use `md5_init`, `md5_update` and `md5_done` (the names may vary), where `md5_update` can be called as often as necessary, and `md5_done` does the padding and calculates the final result. With Lua, the API can be something that is used like this:\r\n```lua\r\n-- this should print the MD5 of \"Hello, World!\" which is 65a8e27d8879283831b664bd8b7f0ad4\r\nstate = md5.new()\r\nstate:update(\"Hello\")\r\nstate:update(\", World!\")\r\nresult = state:finish()\r\nprint(md5.tohex(result))\r\n```\r\nThe advantage is that when the files are long, it's not necessary to send the whole file in one go: it can be calculated on the fly instead (only the last A,B,C,D and up to 63 bytes of buffer are necessary to be kept between calls, thus saving memory). This would allow calculating the MD5 of files larger than those that fit in memory"},"comment":{"url":"https://api.github.com/repos/kikito/md5.lua/issues/comments/232972799","html_url":"https://github.com/kikito/md5.lua/issues/8#issuecomment-232972799","issue_url":"https://api.github.com/repos/kikito/md5.lua/issues/8","id":232972799,"user":{"login":"kikito","id":63131,"avatar_url":"https://avatars.githubusercontent.com/u/63131?v=3","gravatar_id":"","url":"https://api.github.com/users/kikito","html_url":"https://github.com/kikito","followers_url":"https://api.github.com/users/kikito/followers","following_url":"https://api.github.com/users/kikito/following{/other_user}","gists_url":"https://api.github.com/users/kikito/gists{/gist_id}","starred_url":"https://api.github.com/users/kikito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kikito/subscriptions","organizations_url":"https://api.github.com/users/kikito/orgs","repos_url":"https://api.github.com/users/kikito/repos","events_url":"https://api.github.com/users/kikito/events{/privacy}","received_events_url":"https://api.github.com/users/kikito/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T14:50:37Z","updated_at":"2016-07-15T14:50:37Z","body":"Implemented in #10"}}
{"actor":{"display_login":"kikito"}}