Documentation ¶
Index ¶
- Variables
- func CopyGopath(packageName, newGopath string, keepTests bool) error
- func EncryptComponents(pkgName string, n NameHasher) string
- func EncryptPackageName(dir string, p NameHasher) string
- func Obfuscate(pkgName, outPath string) bool
- func ObfuscatePackageNames(gopath string, n NameHasher, ctx build.Context) string
- func ObfuscateStrings(gopath string) error
- func ObfuscateSymbols(gopath string, n NameHasher, ctx build.Context) error
- type NameHasher
Constants ¶
This section is empty.
Variables ¶
View Source
var IgnoreMethods = map[string]bool{"main": true, "init": true}
IgnoreMethods TODO MAKE COMMENT
Functions ¶
func CopyGopath ¶
CopyGopath creates a new Gopath with a copy of a package and all of its dependencies.
func EncryptComponents ¶
func EncryptComponents(pkgName string, n NameHasher) string
EncryptComponents h
func EncryptPackageName ¶
func EncryptPackageName(dir string, p NameHasher) string
EncryptPackageName Takes the file and gets the filename then makes it a hash of the name and returns the new filepath
func ObfuscatePackageNames ¶
func ObfuscatePackageNames(gopath string, n NameHasher, ctx build.Context) string
ObfuscatePackageNames obfuscates package names
func ObfuscateStrings ¶
ObfuscateStrings is used to obfuscate strings in the custom golang files
func ObfuscateSymbols ¶
func ObfuscateSymbols(gopath string, n NameHasher, ctx build.Context) error
ObfuscateSymbols does as the name says
Types ¶
type NameHasher ¶
type NameHasher []byte
A NameHasher is added to the input of a hash function to make it 'impossible' to find the input value
func (NameHasher) Hash ¶
func (n NameHasher) Hash(token string) string
Hash hashes the padding + token. The case of the first letter of the token is preserved.
Click to show internal directories.
Click to hide internal directories.