rlebeau on master
Fix for THANDLE_32 define on OS… (compare)
TIdHashSHA256class in the
IdHashSHAunit. But Indy does not natively implement SHA hashes other than SHA1 (that is a TODO item: IndySockets/Indy#169), other SHA hashes require external hashing code be hooked up to Indy at runtime. By default, Indy provides an implementation of SHA hashes using OpenSSL. Just add the
IdSSLOpenSSLHeadersunit to your uses clause, call
IdSSLOpenSSLHeaders.Load()at program startup, and deploy the 2 OpenSSL DLLs (ssleay32.dll and libeay32.dll) with your app. Then
TIdHashSHA...classes) should work. If you want to use a different hashing implementation, you can certainly do that, just hook up the SHA256 function pointers in the
IdFIPSunit to whatever implementation you want.
IOHandler.ReadTimeoutproperty to a short timeout and then handle any
EIdReadTimedOuterrors that occur. Or, before calling
ReadByte()?), you can check
IOHandler.InputBufferIsEmptyand if True then call
IOHandler.CheckForDataOnSource()with a timeout, and skip
IOHandler.InputBufferactually has something available to read.
/proc/sys/net/ipv6/bindv6only) that can automatically bind an IPv4 port when binding an IPv6 port without needing separate sockets or the IPV6_V6ONLY option enabled explicitly in code.