go/src/cmd/internal/codesign/codesign.go

const pageSizeBits

const pageSize

const LC_CODE_SIGNATURE

const CSMAGIC_REQUIREMENT

const CSMAGIC_REQUIREMENTS

const CSMAGIC_CODEDIRECTORY

const CSMAGIC_EMBEDDED_SIGNATURE

const CSMAGIC_DETACHED_SIGNATURE

const CSSLOT_CODEDIRECTORY

const CS_HASHTYPE_SHA1

const CS_HASHTYPE_SHA256

const CS_HASHTYPE_SHA256_TRUNCATED

const CS_HASHTYPE_SHA384

const CS_EXECSEG_MAIN_BINARY

const CS_EXECSEG_ALLOW_UNSIGNED

const CS_EXECSEG_DEBUGGER

const CS_EXECSEG_JIT

const CS_EXECSEG_SKIP_LV

const CS_EXECSEG_CAN_LOAD_CDHASH

const CS_EXECSEG_CAN_EXEC_CDHASH

type Blob

func (b *Blob) put(out []byte) []byte {}

const blobSize

type SuperBlob

func (s *SuperBlob) put(out []byte) []byte {}

const superBlobSize

type CodeDirectory

func (c *CodeDirectory) put(out []byte) []byte {}

const codeDirectorySize

type CodeSigCmd

func FindCodeSigCmd(f *macho.File) (CodeSigCmd, bool) {}

func put32be(b []byte, x uint32) []byte {}

func put64be(b []byte, x uint64) []byte {}

func put8(b []byte, x uint8) []byte     {}

func puts(b, s []byte) []byte           {}

// Size computes the size of the code signature.
// id is the identifier used for signing (a field in CodeDirectory blob, which
// has no significance in ad-hoc signing).
func Size(codeSize int64, id string) int64 {}

// Sign generates an ad-hoc code signature and writes it to out.
// out must have length at least Size(codeSize, id).
// data is the file content without the signature, of size codeSize.
// textOff and textSize is the file offset and size of the text segment.
// isMain is true if this is a main executable.
// id is the identifier used for signing (a field in CodeDirectory blob, which
// has no significance in ad-hoc signing).
func Sign(out []byte, data io.Reader, id string, codeSize, textOff, textSize int64, isMain bool) {}