win32crypt.CryptBinaryToString

str = CryptBinaryToString(Binary, Flags )

Formats a binary buffer into the specified type of string

Parameters

Binary : bytes

Buffer containing raw data to be formatted

Flags : int

Type of output desired, win32cryptcon.CRYPT_STRING_* value

Win32 API References

Search for CryptBinaryToString at msdn, google or google groups.