Tools to manipulate _blocks_ of bytes

What would you recommend for manipulating blocks of bytes? Getting busy with solving some puzzles involving node:crypto module I found that I lack any tool to work with blocks. For example, it would be great to declare that block is 16 (or any other) number of bytes, and continue to work with buffers on that block level.

If JS lacks of this sort tooling, would TypeScript save the day?

1 Like

Which puzzles ?

I have coded a linear shift register a few weeks ago. It is a stream cipher so it is just doing binary addition. And was thinking on coding something more interesting maybe.

Yes you can use iobuffer, idk if that is what you need.

BTW Typescript is just a “type setting and checker” sort of tool. Not a language in that sense, what runs is always JS as it will be faster. Hope it makes sense.

It’s https://cryptopals.com/.

Thanks, but I can’t find anything for blocks there. So, if nobody will recommend a tool, I’ll end up with adapting to existing buffer syntax, writing own helpers, and maybe couple of functions from https://github.com/branscha/lib-bytes. =(

Yeah, so I thought maybe there is a natural way to declare something like a block type on-top of Nodejs Buffer, for example. Didn’t learn TS yet, so can’t say much anything for certain. =)

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.