albc

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package albc provides utilities related to Apple Activation Lock Bypass Codes. Based on the Go implementation by Victor Vrantchen introduced in https://github.com/micromdm/micromdm/commit/11d83211924a32fb5cd38d1ad67ba0fecbbfed3e

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BypassCode

type BypassCode [16]byte

BypassCode is the "raw" form of an Apple Activation Lock Bypass Code. See https://developer.apple.com/documentation/devicemanagement/creating-and-using-bypass-codes

func New

func New() (BypassCode, error)

New creates a new random bypass code.

func NewFromBytes

func NewFromBytes(b []byte) (BypassCode, error)

NewFromBytes creates a new bypass code from b. The first 16 bytes are copied to populate a new bypass code.

func NewFromCode

func NewFromCode(code string) (BypassCode, error)

NewFromCode decodes a dash-separated "human readable" bypass code.

func NewFromReader

func NewFromReader(reader io.Reader) (BypassCode, error)

NewFromReader reads 16 bytes from reader to populate a new bypass code.

func (BypassCode) Code

func (c BypassCode) Code() (string, error)

Code generates the dash-separated "human readable" form of c.

func (BypassCode) Hash

func (c BypassCode) Hash() (string, error)

Hash generates a hex encoded PBKDF2 derived hash of c. Used for i.e. activation locking a device using the Apple DEP APIs. Apple describes the hash as SHA256 with static salt and fixed iterations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL