mirleft / ocaml-nocrypto

OCaml cryptographic library
ISC License
111 stars 53 forks source link

ARC4: add in-place variant #51

Closed nojb closed 4 years ago

nojb commented 9 years ago

Allow to pass an output buffer (possibly equal to the input buffer) to do ARC4 encoding/decoding. In my use case (BitTorrent) this cipher is applied to large amount of data and doing it in-place has a rather positive impact in memory consumption (in part because Cstruct's are not compacted by the GC).

nojb commented 4 years ago

I don't even remember why I needed this :)