refactor: rename keys package to masterkey

"keys" was too generic — it collided with the keys local var, the keys.MasterKeys field, and the CLI keys subcommand. Folds in PickOptions→DiscoverOptions and browser/ comment cleanup.
This commit is contained in:
moonD4rk
2026-06-01 15:41:40 +08:00
parent c951d7ac16
commit 75b15c6fc4
44 changed files with 210 additions and 262 deletions
+21
View File
@@ -0,0 +1,21 @@
//go:build darwin || linux
package masterkey
import (
"hash"
"github.com/moond4rk/hackbrowserdata/crypto"
)
// pbkdf2Params holds platform-specific PBKDF2 parameters (each platform file defines its own).
type pbkdf2Params struct {
salt []byte
iterations int
keySize int
hashFunc func() hash.Hash
}
func (p pbkdf2Params) deriveKey(secret []byte) []byte {
return crypto.PBKDF2Key(secret, p.salt, p.iterations, p.keySize, p.hashFunc)
}