mirror of
https://github.com/moonD4rk/HackBrowserData.git
synced 2026-05-19 18:58:03 +02:00
239501535a
Co-authored-by: Michael L <luoshitou9@gmail.com>
20 lines
478 B
Go
20 lines
478 B
Go
//go:build darwin
|
|
|
|
package crypto
|
|
|
|
import "errors"
|
|
|
|
var ErrDarwinNotSupportDPAPI = errors.New("darwin not support dpapi")
|
|
|
|
func DecryptWithChromium(key, password []byte) ([]byte, error) {
|
|
if len(password) <= 3 {
|
|
return nil, ErrCiphertextLengthIsInvalid
|
|
}
|
|
iv := []byte{32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}
|
|
return AES128CBCDecrypt(key, iv, password[3:])
|
|
}
|
|
|
|
func DecryptWithDPAPI(_ []byte) ([]byte, error) {
|
|
return nil, ErrDarwinNotSupportDPAPI
|
|
}
|