Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract md5 #11

Closed
fanatid opened this issue Mar 29, 2016 · 12 comments
Closed

extract md5 #11

fanatid opened this issue Mar 29, 2016 · 12 comments
Assignees

Comments

@fanatid
Copy link

fanatid commented Mar 29, 2016

Why? Because you already extracted sha.js and ripemd160, but md5 is still here in files md5.js and make-hash.js. Also it's help with browserify/EVP_BytesToKey#3.

If you're agree I can create this package and then transfer to organization crypto-browserify.

@calvinmetcalf
Copy link
Contributor

go for it

@fanatid
Copy link
Author

fanatid commented Mar 31, 2016

Depends from browserify/sha.js#25

@fanatid
Copy link
Author

fanatid commented Apr 4, 2016

@calvinmetcalf I extracted md5 -- http://github.com/fanatid/md5.js (based on hash-base -- http://github.com/fanatid/hash-base).
I also added you on npm! (You can add other crypto-browserify members and remove me, I don't object)

Can we discuss this packages? and after I'll continue with integration hash-base to sha.js and ripemd160..
I wanted transfer repositories, but found that I should have admin rights... :( but we can ask github support about this! repositories were moved
screenshot at 2016-04-04 19 27 57

cc @dcousens @dominictarr @jprichardson

@calvinmetcalf
Copy link
Contributor

md5 looks good

@fanatid fanatid self-assigned this Apr 4, 2016
@fanatid
Copy link
Author

fanatid commented Apr 4, 2016

@calvinmetcalf what you think about DEFAULT_ENCODING in hash-base?

@calvinmetcalf
Copy link
Contributor

  • why is it a static method on the creatHash class?
  • it should be an if/else if not an if/if

@fanatid
Copy link
Author

fanatid commented Apr 4, 2016

why is it a static method on the creatHash class?

it's static because in node crypto this is static
in createHash we can use getter/setter (and reassign in md5.js, sha.js, ripemd160)

it should be an if/else if not an if/if

if/if because we should change buffer -> binary (new Buffer('data', 'buffer') is invalid)

@calvinmetcalf
Copy link
Contributor

so default encoding is on the crypto module not the individual modules, if we were to implement that I don't think this would be the way to do it

@fanatid
Copy link
Author

fanatid commented Apr 4, 2016

yes, DEFAULT_ENCODING is top property and I don't know how implement this in small modules
should we support this feature?

@calvinmetcalf
Copy link
Contributor

I will live if we don't, nobody has complained yet

@calvinmetcalf
Copy link
Contributor

nodejs/node#6042

@dcousens
Copy link
Member

Close in favour of #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants