WinStd
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
Classes | Functions
Cred.h File Reference

Integrates WinStd classes with Microsoft Credentials API. More...

#include "Common.h"
#include <wincred.h>
#include <memory>

Go to the source code of this file.

Classes

struct  winstd::CredFree_delete< _Ty >
 Deleter for unique_ptr using CredFree. More...
 
struct  winstd::CredFree_delete< _Ty[]>
 Deleter for unique_ptr to array of unknown size using CredFree. More...
 

Functions

template<class _Traits , class _Ax >
static BOOL CredProtectA (BOOL fAsSelf, LPCSTR pszCredentials, DWORD cchCredentials, std::basic_string< char, _Traits, _Ax > &sProtectedCredentials, CRED_PROTECTION_TYPE *ProtectionType)
 Encrypts the specified credentials so that only the current security context can decrypt them. More...
 
template<class _Traits , class _Ax >
static BOOL CredProtectW (BOOL fAsSelf, LPCWSTR pszCredentials, DWORD cchCredentials, std::basic_string< wchar_t, _Traits, _Ax > &sProtectedCredentials, CRED_PROTECTION_TYPE *ProtectionType)
 Encrypts the specified credentials so that only the current security context can decrypt them. More...
 
template<class _Traits , class _Ax >
static BOOL CredUnprotectA (BOOL fAsSelf, LPCSTR pszProtectedCredentials, DWORD cchCredentials, std::basic_string< char, _Traits, _Ax > &sCredentials)
 Decrypts credentials that were previously encrypted by using the CredProtect function. More...
 
template<class _Traits , class _Ax >
static BOOL CredUnprotectW (BOOL fAsSelf, LPCWSTR pszProtectedCredentials, DWORD cchCredentials, std::basic_string< wchar_t, _Traits, _Ax > &sCredentials)
 Decrypts credentials that were previously encrypted by using the CredProtect function. More...
 
static BOOL CredEnumerate (LPCTSTR Filter, DWORD Flags, DWORD *Count, std::unique_ptr< PCREDENTIAL[], winstd::CredFree_delete< PCREDENTIAL[]> > &cCredentials) noexcept
 Enumerates the credentials from the user's credential set. The credential set used is the one associated with the logon session of the current token. The token must not have the user's SID disabled. More...
 

Detailed Description

Integrates WinStd classes with Microsoft Credentials API.