mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-10-13 03:37:12 +02:00
refactor: extract master-key code into masterkey package (#604)
This commit is contained in:
1 parent
b901f7dff0
commit
c444314832
50 files changed
+449
-580
No files matched your search
@@ -8,8 +8,8 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/moond4rk/hackbrowserdata/crypto/keyretriever"
|
||||
"github.com/moond4rk/hackbrowserdata/filemanager"
|
||||
"github.com/moond4rk/hackbrowserdata/masterkey"
|
||||
"github.com/moond4rk/hackbrowserdata/types"
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ func TestExtractCategory_CustomExtractor(t *testing.T) {
|
||||
}
|
||||
|
||||
data := &types.BrowserData{}
|
||||
p.extractCategory(data, types.Extension, keyretriever.MasterKeys{}, "unused-path")
|
||||
p.extractCategory(data, types.Extension, masterkey.MasterKeys{}, "unused-path")
|
||||
|
||||
assert.True(t, called, "custom extractor should be called")
|
||||
require.Len(t, data.Extensions, 1)
|
||||
@@ -51,7 +51,7 @@ func TestExtractCategory_DefaultFallback(t *testing.T) {
|
||||
}
|
||||
|
||||
data := &types.BrowserData{}
|
||||
p.extractCategory(data, types.History, keyretriever.MasterKeys{}, path)
|
||||
p.extractCategory(data, types.History, masterkey.MasterKeys{}, path)
|
||||
|
||||
require.Len(t, data.Histories, 1)
|
||||
assert.Equal(t, "Example", data.Histories[0].Title)
|
||||
|
||||
Reference in new issue
Block a user