win32cred.CredMarshalCredential

PyUnicode = CredMarshalCredential(CredType, Credential )

Marshals a credential into a unicode string

Parameters

CredType : int

CertCredential or UsernameTargetCredential

Credential : str/PyUnicode

The credential to be marshalled. Type is dependent on CredType.

CredType Type of Credential
CertCredentialString containing the SHA1 hash of user's certificate
UsernameTargetCredentialUnicode string containing a username for which credentials exist in current logon session

Comments

Credentials with Flags that contain CRED_FLAGS_USERNAME_TARGET can be marshalled to be passed as the username to functions that normally require a username/password combination, such as win32security::LogonUser and win32net::NetUseAdd