w32api

package
v0.0.0-...-9fb4c64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CREATE_FOR_IMPORT = 1
	CREATE_FOR_DIR    = 2
	OVERWRITE_HIDDEN  = 4
)

flag for OpenEncryptedFileRaw

Variables

This section is empty.

Functions

func AddUsersToEncryptedFile

func AddUsersToEncryptedFile(fileName string, encryptionCertificates []ENCRYPTION_CERTIFICATE) error

func DecryptFile

func DecryptFile(fileName string, reserved uint32) error

reserved should be 0

func DuplicateEncryptionInfoFile

func DuplicateEncryptionInfoFile(srcFileName, dstFilename string, creationDistribution, attributes uint32, securityAttributes *windows.SecurityAttributes) error

func EncryptFile

func EncryptFile(fileName string) error

func EncryptionDisable

func EncryptionDisable(dirPath string, disable bool) error

func FileEncryptionStatus

func FileEncryptionStatus(fileName string) (status uint32, err error)

func OpenEncryptedFileRaw

func OpenEncryptedFileRaw(fileName string, flags uint32) (context unsafe.Pointer, err error)

func RemoveUsersFromEncryptedFile

func RemoveUsersFromEncryptedFile(fileName string, hashes []ENCRYPTION_CERTIFICATE_HASH) error

Types

type EFS_CERTIFICATE_BLOB

type EFS_CERTIFICATE_BLOB struct {
	CertEncodingType uint32
	CbData           uint32
	PbData           *byte
}

type EFS_HASH_BLOB

type EFS_HASH_BLOB struct {
	CbData uint32
	PbData *byte
}

type ENCRYPTION_CERTIFICATE

type ENCRYPTION_CERTIFICATE struct {
	TotalLength uint32
	UserSid     *windows.SID
	CertBlob    *EFS_CERTIFICATE_BLOB
}

type ENCRYPTION_CERTIFICATE_HASH

type ENCRYPTION_CERTIFICATE_HASH struct {
	TotalLength        uint32
	UserSid            *windows.SID
	Hash               *EFS_HASH_BLOB
	DisplayInformation *uint16
}

type ENCRYPTION_CERTIFICATE_HASH_LIST

type ENCRYPTION_CERTIFICATE_HASH_LIST struct {
	NumCertHash uint32
	Users       *ENCRYPTION_CERTIFICATE_HASH // []ENCRYPTION_CERTIFICATE_HASH
}

func QueryRecoveryAgentsOnEncryptedFile

func QueryRecoveryAgentsOnEncryptedFile(fileName string) (*ENCRYPTION_CERTIFICATE_HASH_LIST, error)

func QueryUsersOnEncryptedFile

func QueryUsersOnEncryptedFile(fileName string) (*ENCRYPTION_CERTIFICATE_HASH_LIST, error)

type ENCRYPTION_CERTIFICATE_LIST

type ENCRYPTION_CERTIFICATE_LIST struct {
	NumUser uint32
	Users   *ENCRYPTION_CERTIFICATE // []ENCRYPTION_CERTIFICATE
}

type PRE_EXPORT_FUNC

type PRE_EXPORT_FUNC func(data *byte, callbackContext unsafe.Pointer, length *uint32) uintptr

DWORD PfeExportFunc(

[in]           PBYTE pbData,
[in, optional] PVOID pvCallbackContext,
[in]           ULONG ulLength

) {...}

type PRE_IMPORT_FUNC

type PRE_IMPORT_FUNC func(data *byte, callbackContext unsafe.Pointer, length uint32) uintptr

DWORD PfeImportFunc(

[in]           PBYTE pbData,
[in, optional] PVOID pvCallbackContext,
[in, out]      PULONG ulLength

) {...}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL