mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-06 21:37:47 +02:00
refactor: Optimize traversal browser data logic (#311)
* refactor: Refactor package names and imports for better code organization. * refactor: Package imports and variable types for consistency * chore: Disable unused-parameter rule in revive. * refactor: Refactor and organize data extraction and browserdata parse. * fix: rename wrong error message info
This commit is contained in:
+3
-5
@@ -9,9 +9,7 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var (
|
||||
ErrCiphertextLengthIsInvalid = errors.New("ciphertext length is invalid")
|
||||
)
|
||||
var ErrCiphertextLengthIsInvalid = errors.New("ciphertext length is invalid")
|
||||
|
||||
func AES128CBCDecrypt(key, iv, ciphertext []byte) ([]byte, error) {
|
||||
block, err := aes.NewCipher(key)
|
||||
@@ -57,7 +55,7 @@ func AES128CBCEncrypt(key, iv, plaintext []byte) ([]byte, error) {
|
||||
return encryptedData, nil
|
||||
}
|
||||
|
||||
func DES3Decrypt(key, iv []byte, ciphertext []byte) ([]byte, error) {
|
||||
func DES3Decrypt(key, iv, ciphertext []byte) ([]byte, error) {
|
||||
block, err := des.NewTripleDESCipher(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -76,7 +74,7 @@ func DES3Decrypt(key, iv []byte, ciphertext []byte) ([]byte, error) {
|
||||
return pkcs5UnPadding(sq)
|
||||
}
|
||||
|
||||
func DES3Encrypt(key, iv []byte, plaintext []byte) ([]byte, error) {
|
||||
func DES3Encrypt(key, iv, plaintext []byte) ([]byte, error) {
|
||||
block, err := des.NewTripleDESCipher(key)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user