browserify / browserify/createHash

Uncaught TypeError: Cannot read properties of undefined (reading 'call') at Hash.CipherBase

未关闭
#30 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
53
派生
37
PR 合并指标
30 天内没有已合并 PR

描述

I am using this createHash package in my code. The problem is it works fine for the algorithms i.e. 'md5', 'rmd160' and 'ripemd160' however for the sha algorithms, I am getting the error:

const hash = createHash('sha256')
.update(entropyBuffer)
.digest();

Uncaught TypeError: Cannot read properties of undefined (reading 'call')
at Hash.CipherBase (index.js:7:1)
at new Hash (browser.js:9:1)
at createHash (browser.js:29:1)
at deriveChecksumBits (bip39.ts:90:1)
at entropyToMnemonic (bip39.ts:45:1)
at generateMnemonic (bip39.ts:17:1)
at Home.tsx:25:1
at IonLifeCycleContext.tsx:67:1
at Array.forEach ()
at DefaultIonLifeCycleContext.ionViewWillEnter

贡献指南

这个仓库没有索引到贡献指南

调研方向

先从 browser.js 中的 createHash 和 new Hash 开始,然后检查 index.js 中 Hash.CipherBase 失败的位置。重现提供的 sha256 示例,并将其与正常工作的 md5、rmd160 和 ripemd160 算法进行比较。当 SHA 算法在所示用法下不再抛出此 TypeError 时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript
领域
web-dev
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。