ECDSA:使用 remix ide 提供的签名时出现无效签名长度错误

发布于 2025-01-20 06:42:10 字数 494 浏览 3 评论 0原文

我正在 remix ide 中签署消息,并尝试验证签名和数据,因为

  bytes32 hashInput=keccak256(bytes(temp));
        bytes memory signature=bytes("0x975ff3abe5c7df0e95ab76f308f5b73ca0b803f1c7d74d44098bc75c6efd845c7908ff2b2e4b1a9bee653237475e59d17c13634042e4759154e70618850aa89e1c");
        emit test(signature);
        bytes32 h=ECDSA.toEthSignedMessageHash(hashInput);
        address  _signer=ECDSA.recover(h,signature);

函数参数中的温度如下,这是我之前签署的消息。现在签名长度错误困扰着我。我正在使用 openzepplien 的 ECDSA

i am signing messsage in remix ide, and am trying to verify the signature and data as below

  bytes32 hashInput=keccak256(bytes(temp));
        bytes memory signature=bytes("0x975ff3abe5c7df0e95ab76f308f5b73ca0b803f1c7d74d44098bc75c6efd845c7908ff2b2e4b1a9bee653237475e59d17c13634042e4759154e70618850aa89e1c");
        emit test(signature);
        bytes32 h=ECDSA.toEthSignedMessageHash(hashInput);
        address  _signer=ECDSA.recover(h,signature);

temp is coming in arguments of function, this is message that I signed earlier. now the signature length error is troubling me. i am using ecdsa from openzepplien

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文