Skip to content

Conversation

isghe
Copy link

@isghe isghe commented Jun 2, 2021

So it's possible to

bitcore.crypto.Hash.sha256 (bitcore.util.buffer.hexToBuffer('')).toString ('hex');

that correctly produce
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

instead of an assertion error.

This small change is quite invasive anyway, so I think that before being merged, it must be well tested.

So it's possible to

```
bitcore.crypto.Hash.sha256 (bitcore.util.buffer.hexToBuffer('')).toString ('hex');
```

that correctly produce
"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

instead of an assertion error.

This small change is quite invasive anyway, so I think that before being merged, it must be well tested.
isghe added a commit to isghe/bitcore that referenced this pull request Jun 2, 2021
So it's possible to:
```
bitcore.util.buffer.hexToBuffer('').toString('hex');
```

that produce an empty string as expected,
instead od an assertion error.

This commit makes bitpay#3181 unnecessary.
@isghe
Copy link
Author

isghe commented Jun 2, 2021

#3182 makes this PR unnecessary.
So I am closing this PR.

@isghe isghe closed this Jun 2, 2021
@isghe isghe deleted the isHexaOrEmpty branch June 2, 2021 14:13
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.

1 participant