refactor: add comments and format code style

This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ
2022-08-14 01:18:28 +08:00
parent 77991605b2
commit 147d57e8f4
4 changed files with 100 additions and 75 deletions
+9 -9
View File
@@ -1,17 +1,17 @@
package decrypter
func Chromium(key, encryptPass []byte) ([]byte, error) {
chromeIV := []byte{32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}
if len(encryptPass) > 3 {
if len(key) == 0 {
return nil, errSecurityKeyIsEmpty
}
return aes128CBCDecrypt(key, chromeIV, encryptPass[3:])
} else {
return nil, errDecryptFailed
if len(encryptPass) < 3 {
return nil, errPasswordIsEmpty
}
if len(key) == 0 {
return nil, errSecurityKeyIsEmpty
}
chromeIV := []byte{32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}
return aes128CBCDecrypt(key, chromeIV, encryptPass[3:])
}
func DPApi(data []byte) ([]byte, error) {
func DPAPI(data []byte) ([]byte, error) {
return nil, nil
}