how to print ubyte*

brad clawsie via Digitalmars-d-learn digitalmars-d-learn at
Wed Apr 30 00:27:23 PDT 2014

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;
       auto key = "123456";
       auto s = "hello";

       auto digest = HMAC(EVP_sha1(),
                          cast(void *) key,
                          cast(int) key.length,
                          cast(ubyte*) s,
                          cast(int) s.length,


"digest" should be of type ubyte*

does anyone know how to print this out as ascii?


More information about the Digitalmars-d-learn mailing list