static size_t get_entropy_hook(RAND_DRBG *drbg, unsigned char **pout,
                          int entropy, size_t min_len, size_t max_len)
{
    size_t ret;
    HOOK_CTX *ctx = get_hook_ctx(drbg);
    if (ctx->fail != 0)
        return 0;
    ret = ctx->get_entropy(
        drbg, pout, entropy, min_len, max_len);
    if (ret != 0)
        ctx->reseed_count++;
    return ret;
}
['static size_t get_entropy_hook(RAND_DRBG *drbg, unsigned char **pout,\n                          int entropy, size_t min_len, size_t max_len)\n{\n    size_t ret;\n    HOOK_CTX *ctx = get_hook_ctx(drbg);\n    if (ctx->fail != 0)\n        return 0;\n    ret = ctx->get_entropy(\n        drbg, pout, entropy, min_len, max_len);\n    if (ret != 0)\n        ctx->reseed_count++;\n    return ret;\n}', 'static HOOK_CTX *get_hook_ctx(RAND_DRBG *drbg)\n{\n    return (HOOK_CTX *)RAND_DRBG_get_ex_data(drbg, app_data_index);\n}', 'void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx)\n{\n    return CRYPTO_get_ex_data(&drbg->ex_data, idx);\n}', 'void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx)\n{\n    if (ad->sk == NULL || idx >= sk_void_num(ad->sk))\n        return NULL;\n    return sk_void_value(ad->sk, idx);\n}']