Closed arj03 closed 1 year ago
To add a bit more context, sodium-universal is a leaky abstraction :( On native it returns a buffer and in javascript it returns an Uint8Array. Sigh. Sodium-universal actually has exactly this example and uses:
var rnd = Buffer.allocUnsafe(12) // Cryptographically random data
instead of sodium malloc. That would also work. The Buffer.from does a copy so it's a tiny more inefficient.
Ok, updated to better solution.
Thanks for taking a look. I shall bug the mix master with no notifications once he is back.
@mixmix can you have a look?
thanks @arj03 good to go
With this tribes2 is working in a browser :)