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

rmd160 not supported on electron apps #12

Open
atlantisstorm opened this issue May 18, 2023 · 0 comments
Open

rmd160 not supported on electron apps #12

atlantisstorm opened this issue May 18, 2023 · 0 comments

Comments

@atlantisstorm
Copy link

Hi,

I'm working on an electron desktop app which uses bitbox-sdk repo, which in turn uses @bitcoin-dot-com/bitcoincashjs2-lib. Within this there is the crypto.js file which declares the following function:

...
function ripemd160 (buffer) {
return createHash('rmd160').update(buffer).digest()
}
...

This function is called via the .sign function, but results in an error message 'Digest method not supported'.

Calling crypto.getHashes from within the electron app results in the following:
f
'md4',
'md5',
'ripemd160',
'sha1',
'sha224',
'sha256',
'sha384',
'sha512',
'sha512-256'
]

as a test, if I edit the crypto.js file locally within the node_modules directory so that the function comes:
function ripemd160 (buffer) {
return createHash('ripemd160'').update(buffer).digest()
}
... then the sign request works.

So it is possible to make this update on this library?

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

No branches or pull requests

1 participant