mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
add key function documents
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"crypto/des"
|
||||
"encoding/asn1"
|
||||
"errors"
|
||||
|
||||
"hack-browser-data/log"
|
||||
)
|
||||
|
||||
@@ -33,6 +34,7 @@ func PKCS5UnPadding(src []byte) []byte {
|
||||
return src[:(length - unpad)]
|
||||
}
|
||||
|
||||
// Des3Decrypt use for decrypt firefox PBE
|
||||
func Des3Decrypt(key, iv []byte, src []byte) ([]byte, error) {
|
||||
block, err := des.NewTripleDESCipher(key)
|
||||
if err != nil {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"crypto/hmac"
|
||||
"crypto/sha1"
|
||||
"encoding/asn1"
|
||||
|
||||
"hack-browser-data/log"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"crypto/sha256"
|
||||
"encoding/asn1"
|
||||
"encoding/hex"
|
||||
|
||||
"hack-browser-data/log"
|
||||
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
@@ -40,7 +41,6 @@ SEQUENCE (2 elem)
|
||||
INTEGER 1
|
||||
OCTET STRING (16 byte)
|
||||
*/
|
||||
|
||||
type MetaPBE struct {
|
||||
SequenceA
|
||||
Encrypted []byte
|
||||
@@ -101,7 +101,6 @@ func DecodeMeta(decodeItem []byte) (pbe MetaPBE, err error) {
|
||||
}
|
||||
|
||||
func DecodeNss(nssA11Bytes []byte) (pbe NssPBE, err error) {
|
||||
log.Debug(hex.EncodeToString(nssA11Bytes))
|
||||
_, err = asn1.Unmarshal(nssA11Bytes, &pbe)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
|
||||
@@ -7,10 +7,11 @@ import (
|
||||
"crypto/sha256"
|
||||
"encoding/asn1"
|
||||
"encoding/hex"
|
||||
"hack-browser-data/log"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
"hack-browser-data/log"
|
||||
|
||||
"golang.org/x/crypto/pbkdf2"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user