mongodb / winkerberos

A native Kerberos client implementation for Python on Windows
Apache License 2.0
54 stars 15 forks source link

Use CryptBinaryToString() for base64 instead of Apple's base64.c #2

Closed schlenk closed 8 years ago

schlenk commented 8 years ago

https://msdn.microsoft.com/en-us/library/windows/desktop/aa379887%28v=vs.85%29.aspx

You probably load crypt32.dll anyway via the SSPI stuff.

behackett commented 8 years ago

That's an interesting idea, thanks for the link. It would be nice to get rid of Apple's base64 library.

behackett commented 8 years ago

See also CryptStringToBinary()

https://msdn.microsoft.com/en-us/library/windows/desktop/aa380285(v=vs.85).aspx

behackett commented 8 years ago

It looks like you have to explicitly link against Crypt32.lib for this to work. secur32.lib isn't enough.