mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
fix: support Linux v11 cipher prefix for Chromium decryption (#571)
This commit is contained in:
@@ -13,6 +13,7 @@ func TestDetectVersion(t *testing.T) {
|
||||
want CipherVersion
|
||||
}{
|
||||
{"v10 prefix", []byte("v10" + "encrypted_data"), CipherV10},
|
||||
{"v11 prefix", []byte("v11" + "encrypted_data"), CipherV11},
|
||||
{"v20 prefix", []byte("v20" + "encrypted_data"), CipherV20},
|
||||
{"no prefix (DPAPI)", []byte{0x01, 0x00, 0x00, 0x00}, CipherDPAPI},
|
||||
{"short input", []byte{0x01, 0x02}, CipherDPAPI},
|
||||
@@ -34,6 +35,7 @@ func Test_stripPrefix(t *testing.T) {
|
||||
want []byte
|
||||
}{
|
||||
{"strips v10", []byte("v10PAYLOAD"), []byte("PAYLOAD")},
|
||||
{"strips v11", []byte("v11PAYLOAD"), []byte("PAYLOAD")},
|
||||
{"strips v20", []byte("v20PAYLOAD"), []byte("PAYLOAD")},
|
||||
{"keeps DPAPI unchanged", []byte{0x01, 0x00, 0x00}, []byte{0x01, 0x00, 0x00}},
|
||||
{"keeps short unchanged", []byte{0x01}, []byte{0x01}},
|
||||
|
||||
Reference in New Issue
Block a user