mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-12-04 05:43:27 +01:00
Comments that restated names or narrated the code are gone, and multi-line ones are cut to a line of why. Only comments change: each edited Go file has the same token stream as before. winapi and abe come later.
21 lines
369 B
Go
21 lines
369 B
Go
//go:build darwin || linux
|
|
|
|
package masterkey
|
|
|
|
import (
|
|
"hash"
|
|
|
|
"github.com/moond4rk/hackbrowserdata/internal/crypto"
|
|
)
|
|
|
|
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)
|
|
}
|