how to print ubyte*

2014-04-30 Thread brad clawsie via Digitalmars-d-learn
hi, I'm back again with another openssl related question. given this program -- import std.stdio; import deimos.openssl.hmac; import deimos.openssl.evp; void main() { HMAC_CTX *ctx = new HMAC_CTX; HMAC_CTX_init(ctx); auto key = 123456; auto s =

Re: how to print ubyte*

2014-04-30 Thread bearophile via Digitalmars-d-learn
brad clawsie: auto digest = HMAC(EVP_sha1(), cast(void *) key, Better to attach the * to void. cast(int) key.length, cast(ubyte*) s, Here you are casting a struct of pointer to immutable plus length to a

Re: how to print ubyte*

2014-04-30 Thread Jonathan M Davis via Digitalmars-d-learn
On Wed, 30 Apr 2014 07:27:23 + brad clawsie via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: hi, I'm back again with another openssl related question. given this program -- import std.stdio; import deimos.openssl.hmac; import

I have modified the DFL to X64,but it's not work ,who know why not work?

2014-04-30 Thread FrankLike via Digitalmars-d-learn
Hi,everyone, I have modified the DFL's d files ,now it can get x86 libs,and can get x64 libs. on x86, dfl.lib works ok,but on x64 dfl64.lib works not ok. This is my makelib64.bat ,who can help me? makelib64_libs.bat:make some libs for make dfl libs-- @rem Make DFL

Re: Socket server + thread: cpu usage

2014-04-30 Thread Damian Day via Digitalmars-d-learn
On Tuesday, 29 April 2014 at 17:44:21 UTC, Tim wrote: On Tuesday, 29 April 2014 at 17:35:08 UTC, Tim wrote: On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote: On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote: Is there anything I'm doing wrong? You should be using a blocking

Re: Socket server + thread: cpu usage

2014-04-30 Thread Ali Çehreli via Digitalmars-d-learn
On 04/30/2014 04:24 PM, Damian Day wrote: Thread.sleep( dur!(msecs)( 20 ) ); Going off topic, the UFCS syntax makes that code much more readable. :) Thread.sleep(20.msecs); Ali