Skip to content

Commit

Permalink
add doc for interface function. Close #23
Browse files Browse the repository at this point in the history
  • Loading branch information
moonD4rk committed Aug 1, 2020
1 parent 3fc2a5e commit 4869454
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
7 changes: 7 additions & 0 deletions core/browser.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ const (
)

type Browser interface {
// InitSecretKey is init chrome secret key, firefox's key always empty
InitSecretKey() error

// GetName return browser name
GetName() string

// GetSecretKey return browser secret key
GetSecretKey() []byte

// GetAllItems, default return all of items(password|bookmark|cookie|history)
GetAllItems(itemName string) ([]common.Item, error)
}

Expand Down
9 changes: 9 additions & 0 deletions core/common/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,19 @@ import (
)

type Item interface {
// ChromeParse parse chrome items, Password and Cookie need secret key
ChromeParse(key []byte) error

// FirefoxParse parse firefox items
FirefoxParse() error

// OutPut with json or csv
OutPut(format, browser, dir string) error

// Copy item file to local path
CopyItem() error

// Release item file
Release() error
}

Expand Down
2 changes: 1 addition & 1 deletion core/decrypt/decrypt_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func decryptPBE(globalSalt, masterPwd, entrySalt, encrypted []byte) ([]byte, err
//byte[] k1;
//byte[] tk;
//byte[] k2;
//byte[] k; // final value conytaining key and iv
//byte[] k; // final value containing key and iv
glmp := append(globalSalt, masterPwd...)
hp := sha1.Sum(glmp)
s := append(hp[:], entrySalt...)
Expand Down

0 comments on commit 4869454

Please sign in to comment.