pike.git / src / post_modules / Nettle / cipher.cmod

version» Context lines:

pike.git/src/post_modules/Nettle/cipher.cmod:57:      /*! @module Nettle    */      static struct pike_string *nul13_string = NULL;   static struct pike_string *nul16_string = NULL;      /* Generic callback function for Nettle in case the crypt()    * function in the object isn't a Nettle function.    */ + #ifdef dsa_params_init + /* Nettle 3.0 */   static void pike_crypt_func(const void *object, pike_nettle_size_t length,    uint8_t *dst, const uint8_t *src) -  + #else + static void pike_crypt_func(void *object, pike_nettle_size_t length, +  uint8_t *dst, const uint8_t *src) + #endif   {    struct pike_string *str;    push_string(make_shared_binary_string((const char *)src, length));    apply((struct object *)object, "crypt", 1);    get_all_args("crypt", 1, "%n", &str);    if (str->len != (ptrdiff_t)length) {    Pike_error("Bad string length %ld returned from crypt()\n",    DO_NOT_WARN((long)str->len));    }    memcpy(dst, str->str, length);