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