Files
HackBrowserData/keys/params.go
T
moonD4rk c951d7ac16 refactor(keys): extract master-key package to top-level keys/
Master-key acquisition and the cross-host dump format are a concern distinct from the raw crypto primitives, so crypto/keyretriever moves to an importable top-level keys/. KeyRetriever→Retriever drops the keys.KeyRetriever stutter.
2026-06-01 01:02:45 +08:00

22 lines
451 B
Go

//go:build darwin || linux
package keys
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)
}