Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DoubleOperandOpcodes = make([]bool, 0xff)
var NoOperandOpcodes = make([]bool, 0xff)
var OpcodesInitialised = false
var OtherOpcodes = []uint8{0xc4, 0xab, 0xaa, 0xfe, 0xff, 0xca}
OtherOpcodes that are either reserved or take a variable number of operands
var QuadOperandOpcodes = make([]bool, 0xff)
var SingleOperandOpcodes = make([]bool, 0xff)
var TripleOperandOpcodes = []uint8{0xc5}
Functions ¶
func HashClassInstructions ¶
HashClassInstructions produces a hash of the opcodes that define the methods of the specified class. This is intended to not change if the package name or other details are changed with the resulting changes to the non-opcode parts of the class format.
Types ¶
type Opcodes ¶
type Opcodes struct { NoOperandOpcodeLookupTable []bool SingleOperandOpcodeLookupTable []bool DoubleOperandOpcodeLookupTable []bool QuadOperandOpcodeLookupTable []bool TripleOperandOpcodes []uint8 OtherOpcodes []uint8 }
Opcodes are used when hashing bytecode to separate out the parts that are relatively static when shading or obfuscating classfiles while skipping the operands that change with those modifications.
These tables are intended to use memory (1mb per number of operands) in order to speed up lookups. Total memory use remains reasonable as these are shared between all uses.
func OpcodeLookupTables ¶
func OpcodeLookupTables() Opcodes