hyperledger-archives / education-cryptomoji

https://wiki.hyperledger.org/display/LMDWG
Apache License 2.0
96 stars 370 forks source link

01-Signing.js - 'sign' function is taking in Buffer, might need to add 'toString('hex')' #88

Closed evalineBai closed 6 years ago

emelendez89 commented 6 years ago

https://github.com/hyperledger/education-cryptomoji/blob/dd3d2b38ec59471735b0e28bea37e707f53a32d4/code/part-one/tests/01-Signing.js#L69 Should take Buffer as it shown in the documentation

delventhalz commented 6 years ago

The use of randomBytes to create random messages for testing has caused some confusion. The simplest sign implementation will likely handle either strings or Buffers fine (because createHash handles both strings and Buffers), so I was not particularly specific about which to accept. This is clarified in a new PR (referenced below):