decrypt

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package decrypt Created by Teocci. Author: teocci@yandex.com on 2021-Aug-12

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

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 LoginPBE

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

LoginPBE Login 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 META 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 NSS 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