lib/crypto: add in-place xor cipher on CStrings
authorLucas Bajolet <lucas.bajolet@gmail.com>
Thu, 10 May 2018 18:18:49 +0000 (14:18 -0400)
committerLucas Bajolet <lucas.bajolet@gmail.com>
Thu, 10 May 2018 19:39:54 +0000 (15:39 -0400)
commit9d3504c6b7c6525e396f7eaf8c5391a6bcf71878
tree4a9e133d6e457ff931544053a12fb359a4286eb1
parent6ddf6c8bd94407fd3e1bc978f72f7770ea7be164
lib/crypto: add in-place xor cipher on CStrings

The xor operation as defined in xor_ciphers lacked a performance-aware
version on byte sequences.

This commit adds a fast version to perform it on a CString.

Signed-off-by: Lucas Bajolet <lucas.bajolet@gmail.com>
lib/crypto/xor_ciphers.nit
tests/sav/test_inplace_xor.res [new file with mode: 0644]
tests/test_inplace_xor.nit [new file with mode: 0644]