mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-07-04 21:37:47 +02:00
d720762595
Chromium's v10 means AES-GCM on Windows but AES-CBC on macOS/Linux. Dispatch the cipher by master-key length (32B GCM, 16B CBC) so one binary can decrypt a key dumped from a different OS.
16 lines
490 B
Go
16 lines
490 B
Go
//go:build windows
|
|
|
|
package crypto
|
|
|
|
import (
|
|
"github.com/moond4rk/hackbrowserdata/utils/winapi"
|
|
)
|
|
|
|
// DecryptDPAPI decrypts a DPAPI-protected blob using the current user's
|
|
// master key. The actual Win32 call (and its DATA_BLOB / LocalFree dance)
|
|
// lives in utils/winapi so every package that needs a syscall handle
|
|
// shares a single declaration instead of re-opening Crypt32.dll per call.
|
|
func DecryptDPAPI(ciphertext []byte) ([]byte, error) {
|
|
return winapi.DecryptDPAPI(ciphertext)
|
|
}
|