func EnumProviders() (res []CryptoProvider, err error) {
	var (
		slen, provType, index C.DWORD
	)
	res = make([]CryptoProvider, 0)
	for index = 0; C.CryptEnumProviders(index, nil, 0, &provType, nil, &slen) != 0; index++ {
		buf := make([]byte, slen)
		if C.CryptEnumProviders(index, nil, 0, &provType, (*C.CHAR)(unsafe.Pointer(&buf[0])), &slen) == 0 {
			err = getErr("Error during provider enumeration")
			return
		}
		res = append(res, CryptoProvider{Name: string(buf), Type: ProvType(provType)})
	}
	return
}
EnumProviders returns slice of CryptoProvider structures, describing
available CSPs.
package csp
import "C"
import (
	"unsafe"
)
type CryptFlag C.DWORD
const (
	CryptVerifyContext CryptFlag = C.CRYPT_VERIFYCONTEXT
	CryptNewKeyset     CryptFlag = C.CRYPT_NEWKEYSET
	CryptMachineKeyset CryptFlag = C.CRYPT_MACHINE_KEYSET
	CryptDeleteKeyset  CryptFlag = C.CRYPT_DELETEKEYSET
	CryptSilent        CryptFlag = C.CRYPT_SILENT
)
type ProvType C.DWORD
const (
	ProvRsa          ProvType = C.PROV_RSA_FULL
	ProvGost94       ProvType = 71
	ProvGost2001     ProvType = 75
	ProvGost2012     ProvType = 80
	ProvGost2012_512 ProvType = 81
)
type Ctx struct {
	hProv C.HCRYPTPROV
}
type CryptoProvider struct {
	Name string
	Type ProvType
}