You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/internal/literals
Dominic Breuker b587d8c01a
use the "simple" obfuscator for large literals
Changes literal obfuscation such that literals of any size will be obfuscated,
but beyond `maxSize` we only use the `simple` obfuscator.
This one seems to apply AND, OR, or XOR operators byte-wise and should be safe to use,
unlike some of the other obfuscators which are quadratic on the literal size or worse.

The test for literals is changed a bit to verify that obfuscation is applied.
The code written to the `extra_literals.go` file by the test helper now ensures
that Go does not optimize the literals away when we build the binary.
We also append a unique string to all literals so that we can test that
an unobfuscated build contains this string while an obfuscated build does not.
1 year ago
..
literals.go use the "simple" obfuscator for large literals 1 year ago
obfuscators.go use the "simple" obfuscator for large literals 1 year ago
random_testing.go internal/literals: add benchmark to measure the run-time overhead 1 year ago
seed.go avoid using math/rand's global funcs like Seed and Intn 2 years ago
shuffle.go preallocate data in shuffle and split literal obfuscator 1 year ago
simple.go avoid using math/rand's global funcs like Seed and Intn 2 years ago
split.go preallocate data in shuffle and split literal obfuscator 1 year ago
swap.go avoid using math/rand's global funcs like Seed and Intn 2 years ago