win32crypt.CryptStringToBinary

bytes, int, int = CryptStringToBinary(String, Flags )

Converts a formatted string back into raw bytes

Parameters

String : str

Formatted string to be converted to raw binary data

Flags : int

Input format (win32cryptcon.CRYPT_STRING_*)

Win32 API References

Search for CryptStringToBinary at msdn, google or google groups.

Return Value

Returns the decoded binary data, number of header characters skipped, and CRYPT_STRING_* value denoting the type of data found (used if input Flags is one of *_ANY values)