I'm not programmer, but how about SHA-256 library which use WebAssembly such as
https://github.com/Daninet/hash-wasm? Although i don't know whether such library would work on all browser or CPU.
![](https://ip.bitcointalk.org/?u=https%3A%2F%2Fwww.talkimg.com%2Fimages%2F2024%2F05%2F30%2FLcxd5.png&t=665&c=dn_sSv56tlTEoA)
So basically everything made in the last decade should work fine.
I see, i must've missed that earlier.
WebAssembly doesn't have to worry about supporting x86 or ARM architectures itself, the browser implementations take care of that.
I'd say this is even better than my suggestion to use a different language. I mean, this is literally assembly language after all, it just runs on the browser's engine instead of on an OS.
Weird it doesn't have to worry about CPU architecture, even though the name contain word assembly. Anyway, that means it should fulfill OP needs.