Documentation
¶
Index ¶
- Variables
- func AsconDecrypt(key, nonce, ciphertextAndTag []byte) ([]byte, bool)
- func AsconEncrypt(key, nonce, plaintext []byte) []byte
- func Obfuscate(rand *mathrand.Rand, file *ast.File, info *types.Info, ...) *ast.File
- func RegisteredStrategyNames() []string
- type Builder
- type BuilderConfig
- type NameProviderFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TestObfuscator string
)
Functions ¶
func AsconDecrypt ¶
AsconDecrypt performs ASCON-128 authenticated decryption Input: ciphertext || tag Returns: plaintext, success (false if authentication fails)
func AsconEncrypt ¶
AsconEncrypt performs ASCON-128 authenticated encryption Returns: ciphertext || tag (ciphertext length = plaintext length, tag = 16 bytes)
func Obfuscate ¶
func Obfuscate(rand *mathrand.Rand, file *ast.File, info *types.Info, linkStrings map[*types.Var]string, nameFunc NameProviderFunc, cfg BuilderConfig) *ast.File
Obfuscate replaces literals with obfuscated anonymous functions.
func RegisteredStrategyNames ¶
func RegisteredStrategyNames() []string
RegisteredStrategyNames returns the identifiers of all registered literal obfuscation strategies in registration order. It is primarily used by tooling and tests to reference specific strategies without exposing the underlying implementation type.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(rand *mathrand.Rand, file *ast.File, nameFunc NameProviderFunc, cfg BuilderConfig) *Builder
func (*Builder) ObfuscateFile ¶
type BuilderConfig ¶
type BuilderConfig struct{}
Click to show internal directories.
Click to hide internal directories.