Skip to content

add len parameter in update() of resty.md5#33

Closed
sjnam wants to merge 5 commits intoopenresty:masterfrom
sjnam:master
Closed

add len parameter in update() of resty.md5#33
sjnam wants to merge 5 commits intoopenresty:masterfrom
sjnam:master

Conversation

@sjnam
Copy link
Copy Markdown

@sjnam sjnam commented Mar 25, 2016

When I use _M.update(self, s) in resty.md5, I had an case when len is not #s.
so, how about the following?

function _M.update(self, s, len)
return C.MD5_Update(self._ctx, s, len or #s) == 1
end

@agentzh
Copy link
Copy Markdown
Member

agentzh commented Mar 27, 2016

@sjnam Thanks for the patch! But will you add a test case to the existing test suite too? Thanks!

@sjnam
Copy link
Copy Markdown
Author

sjnam commented Mar 28, 2016

@agentzh I added a test case. Thanks!

@agentzh
Copy link
Copy Markdown
Member

agentzh commented Mar 28, 2016

@sjnam Awesome! I'll look into this as soon as I can manage :) Thanks a lot!

@agentzh
Copy link
Copy Markdown
Member

agentzh commented Mar 28, 2016

@sjnam Mind to add a note to README as well? ;)

@sjnam
Copy link
Copy Markdown
Author

sjnam commented Mar 28, 2016

@agentzh
I just add one comment line and small change to already given test code in README.

@agentzh
Copy link
Copy Markdown
Member

agentzh commented Mar 31, 2016

@sjnam Cool. Thanks!

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.

3 participants