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/testdata/scripts
Daniel Martí ea19e39aa4 use hashWith for obfuscation position information
Position information was obfuscated with math/rand manually, which meant
that the resulting positions were pretty small like "x.go:34", but they
were also very hard to reverse due to their short length and difficulty
to reproduce.

We now hash them with hashWith and the package's GarbleActionID:

	"main.go:203" hashed with 933ad1c700755b7c3a9913c55cade1 to "mwu1xuNz.go"

The input to the hash is the base filename and the byte offset of the
declaration within the file, meaning that it's unique within a package.
The output filename is long enough to allow easy reversal.

The line number is always 1, since the information needed for reversing
is contained entirely within the filename. It doesn't really matter if
we encode data in the filename or line number, but it's easier for us to
use a string.

For #5.
4 years ago
..
asm.txt obfuscate asm function names as well (#273) 4 years ago
basic.txt testdata: remove some unnecessary execs (#267) 4 years ago
cgo.txt all: drop support for Go 1.15.x (#265) 4 years ago
debugdir.txt refactor "current package" with TOOLEXEC_IMPORTPATH (#266) 4 years ago
embed.txt don't obfuscate the "embed" import path 4 years ago
goprivate.txt obfuscate asm function names as well (#273) 4 years ago
goversion.txt all: drop support for Go 1.15.x (#265) 4 years ago
help.txt include a "garble version" test (#221) 4 years ago
implement.txt all: drop support for Go 1.15.x (#265) 4 years ago
imports.txt all: drop support for Go 1.15.x (#265) 4 years ago
init.txt all: drop support for Go 1.15.x (#265) 4 years ago
ldflags.txt testdata: remove some unnecessary execs (#267) 4 years ago
linkname.txt all: drop support for Go 1.15.x (#265) 4 years ago
literals.txt refactor "current package" with TOOLEXEC_IMPORTPATH (#266) 4 years ago
modinfo.txt testdata: remove some unnecessary execs (#267) 4 years ago
plugin.txt all: drop support for Go 1.15.x (#265) 4 years ago
position.txt use hashWith for obfuscation position information 4 years ago
reverse.txt testdata: remove some unnecessary execs (#267) 4 years ago
seed.txt all: drop support for Go 1.15.x (#265) 4 years ago
syntax.txt all: drop support for Go 1.15.x (#265) 4 years ago
test.txt fix and re-enable "garble test" (#268) 4 years ago
tiny.txt use hashWith for obfuscation position information 4 years ago