Skip to content

rmd160 not supported on electron apps #12

@atlantisstorm

Description

@atlantisstorm

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions