decrypt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChromeDecrypt

func ChromeDecrypt(password, masterKey []byte) ([]byte, error)

func Decrypt

func Decrypt(data []byte) ([]byte, error)

func GetFireFoxKey

func GetFireFoxKey(path string) (item1, item2, a11, a102 []byte, err error)

func GetFireFoxLoginData

func GetFireFoxLoginData(path string) (loginData []core.LoginStruct, err error)

func GetMasterKey

func GetMasterKey(dataPath string) ([]byte, error)

func PKCS5UnPadding

func PKCS5UnPadding(src []byte) []byte

func PaddingZero

func PaddingZero(s []byte, l int) []byte

Types

type ASN1PBE

type ASN1PBE interface {
	Decrypt(globalSalt, masterPwd []byte) (key []byte, err error)
}

func NewASN1PBE

func NewASN1PBE(b []byte) (pbe ASN1PBE, err error)

type DATA_BLOB

type DATA_BLOB struct {
	// contains filtered or unexported fields
}

func NewBlob

func NewBlob(d []byte) *DATA_BLOB

func (*DATA_BLOB) ToByteArray

func (b *DATA_BLOB) ToByteArray() []byte

type LoginPBE

type LoginPBE struct {
	CipherText []byte
	LoginSequence
	Encrypted []byte
}

func (LoginPBE) Decrypt

func (l LoginPBE) Decrypt(globalSalt, masterPwd []byte) (key []byte, err error)

type LoginSequence

type LoginSequence struct {
	asn1.ObjectIdentifier
	IV []byte
}

type MetaPBE

type MetaPBE struct {
	MetaSequenceA
	Encrypted []byte
}

func (MetaPBE) Decrypt

func (m MetaPBE) Decrypt(globalSalt, masterPwd []byte) (key2 []byte, err error)

type MetaSequenceA

type MetaSequenceA struct {
	PKCS5PBES2 asn1.ObjectIdentifier
	MetaSequenceB
}

type MetaSequenceB

type MetaSequenceB struct {
	MetaSequenceC
	MetaSequenceD
}

type MetaSequenceC

type MetaSequenceC struct {
	PKCS5PBKDF2 asn1.ObjectIdentifier
	MetaSequenceE
}

type MetaSequenceD

type MetaSequenceD struct {
	AES256CBC asn1.ObjectIdentifier
	IV        []byte
}

type MetaSequenceE

type MetaSequenceE struct {
	EntrySalt      []byte
	IterationCount int
	KeySize        int
	MetaSequenceF
}

type MetaSequenceF

type MetaSequenceF struct {
	HMACWithSHA256 asn1.ObjectIdentifier
}

type NssPBE

type NssPBE struct {
	NssSequenceA
	Encrypted []byte
}

func (NssPBE) Decrypt

func (n NssPBE) Decrypt(globalSalt, masterPwd []byte) (key []byte, err error)

type NssSequenceA

type NssSequenceA struct {
	DecryptMethod asn1.ObjectIdentifier
	NssSequenceB
}

type NssSequenceB

type NssSequenceB struct {
	EntrySalt []byte
	Len       int
}

Jump to

Keyboard shortcuts

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