如何通过字节号在node.js中创建位掩码?
我有一个字符串:0x55739DC6385D81C53D462A255A17C6BD9A71AA68
。
而且我还有一个需要实现的函数:
const caller = '0x55739dC6385d81c53d462a255a17C6bd9A71Aa68';
const from = 160;
const to = 96;
const getCallerMask = (from, to, caller) => {
// need to get mask by from, to on the "caller" string and move bytes to the right by "to" argument
}
这是该函数应该做的:
Mask(160, 96, caller) >> 96
我什至不知道上面的哪种语言,但我想它应该从字符串中拿起字节蒙版并移动指针到右侧的96个字节。有没有办法在node.js中实现它?
I have a string: 0x55739dC6385d81c53d462a255a17C6bd9A71Aa68
.
And also I have a function that I need to implement:
const caller = '0x55739dC6385d81c53d462a255a17C6bd9A71Aa68';
const from = 160;
const to = 96;
const getCallerMask = (from, to, caller) => {
// need to get mask by from, to on the "caller" string and move bytes to the right by "to" argument
}
This is what the function should do:
Mask(160, 96, caller) >> 96
I don't even know in which language the example above, but I guess that it should take the byte mask from the string and move the pointer to 96 bytes to the right. Is there a way to implement it in node.js?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论