abdecrypt

package module
v0.0.0-...-6bc60d0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Magic string = "ANDROID BACKUP"
)

Variables

This section is empty.

Functions

func Decompress

func Decompress(r io.Reader, abheader *AndroidBackupHeader) (io.Reader, error)

Decompress decompresses payload r of an Android backup consulting abheader.

func Decrypt

func Decrypt(r io.Reader, mk *MasterKey) (io.Reader, error)

Decrypt decrypts payload of an Android backup using master key mk.

func NewReader

func NewReader(r io.Reader, passphrase string) (io.Reader, error)

NewReader creates an extractor that decrypts and decompresses Android backup using the passphrase.

Types

type AndroidBackupHeader

type AndroidBackupHeader struct {
	Version       int
	Compressed    bool
	UserSalt      []byte
	ChecksumSalt  []byte
	Rounds        int
	UserIV        []byte
	MasterKeyBlob []byte
}

AndroidBackupHeader represents Android backup header.

func ReadHeader

func ReadHeader(r io.Reader) (*AndroidBackupHeader, io.Reader, error)

ReadHeader reads Android backup header from reader r. Note that ReadHeader returns a reader with remaining data to be used to get backup payload. Original reader will be advanced by ReadHeader.

type MasterKey

type MasterKey struct {
	Version int
	IV      []byte
	Key     []byte
}

MasterKey represents master key and its parameters.

func DeriveMasterKey

func DeriveMasterKey(ab *AndroidBackupHeader, passphrase string) (*MasterKey, error)

DeriveMasterKey derives master key data from backup header and passphrase.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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