win32cred

Interface to credentials management functions.

Functions

CredDelete(TargetName, Type[, Flags]) Remove the given target name from the stored credentials.
CredRead(TargetName, Type[, Flags]) Retrieves a stored credential.
CredWrite(Credential[, Flags]) Creates or updates a stored credential.


win32ctypes.pywin32.win32cred.CredDelete(TargetName, Type, Flags=0)[source]

Remove the given target name from the stored credentials.

Parameters:
  • TargetName (unicode) – The target name to fetch from the keyring.
  • Type (int) – One of the CRED_TYPE_* constants.
  • Flags (int) – Reserved, always use 0.
win32ctypes.pywin32.win32cred.CredRead(TargetName, Type, Flags=0)[source]

Retrieves a stored credential.

Parameters:
  • TargetName (unicode) – The target name to fetch from the keyring.
  • Type (int) – One of the CRED_TYPE_* constants.
  • Flags (int) – Reserved, always use 0.
Returns:

credentials (dict) – None if the target name was not found or A dictionary corresponding to the PyWin32 PyCREDENTIAL structure.

win32ctypes.pywin32.win32cred.CredWrite(Credential, Flags=0)[source]

Creates or updates a stored credential.

Parameters:
  • Credential (dict) – A dictionary corresponding to the PyWin32 PyCREDENTIAL structure.
  • Flags (int) – Always pass CRED_PRESERVE_CREDENTIAL_BLOB (i.e. 0).