dpapi

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: GPL-3.0 Imports: 4 Imported by: 3

README

dpapi is a package with wrapers to MS Windows DPAPI Crypt32.dll (Data Protection API)

Originating from at https://stackoverflow.com/questions/33516053/windows-encrypted-rdp-passwords-in-golang

Documentation

Index

Constants

View Source
const (
	CRYPTPROTECT_UI_FORBIDDEN = 0x1
)

some API constants

Variables

This section is empty.

Functions

func ConvertToUTF16LittleEndianBytes

func ConvertToUTF16LittleEndianBytes(s string) []byte

ConvertToUTF16LittleEndianBytes , Windows is Little endian.

func Decrypt

func Decrypt(data []byte) ([]byte, error)

Decrypt calls Crypt32.dll::CryptUnprotectData

func Encrypt

func Encrypt(data []byte) ([]byte, error)

Encrypt calls DPAPI CryptProtectData

Types

type DATA_BLOB

type DATA_BLOB struct {
	// contains filtered or unexported fields
}

DATA_BLOB is a structure used by Windows DPAPI Crypt32.dll::CryptProtectData(DATA_BLOB...)

func NewBlob

func NewBlob(d []byte) *DATA_BLOB

NewBlob creates DATA_BLOB and fills member pbData

func (*DATA_BLOB) ToByteArray

func (b *DATA_BLOB) ToByteArray() []byte

ToByteArray creates []byte from *byte member

Jump to

Keyboard shortcuts

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