decrypt

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChromePass

func ChromePass(key, encryptPass []byte) ([]byte, error)

func DPApi

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

func PKCS5UnPadding

func PKCS5UnPadding(src []byte) []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 LoginPBE

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

LoginPBE Struct SEQUENCE (3 elem)

OCTET STRING (16 byte)
SEQUENCE (2 elem)
	OBJECT IDENTIFIER
	OCTET STRING (8 byte)
OCTET STRING (16 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
}

MetaPBE Struct SEQUENCE (2 elem)

	SEQUENCE (2 elem)
    	OBJECT IDENTIFIER
    	SEQUENCE (2 elem)
      	SEQUENCE (2 elem)
        	OBJECT IDENTIFIER
        	SEQUENCE (4 elem)
          	OCTET STRING (32 byte)
          		INTEGER 1
          		INTEGER 32
          		SEQUENCE (1 elem)
            	OBJECT IDENTIFIER
      	SEQUENCE (2 elem)
        	OBJECT IDENTIFIER
        	OCTET STRING (14 byte)
  	OCTET STRING (16 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
}

NssPBE Struct SEQUENCE (2 elem)

SEQUENCE (2 elem)
	OBJECT IDENTIFIER
	SEQUENCE (2 elem)
		OCTET STRING (20 byte)
		INTEGER 1
OCTET STRING (16 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