/*
 * Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
 *
 * Licensed under the Apache License 2.0 (the \"License\").  You may not use
 * this file except in compliance with the License.  You can obtain a copy
 * in the file LICENSE in the source distribution or at
 * https://www.openssl.org/source/license.html
 */



/* Machine generated by util/perl/OpenSSL/paramnames.pm */
#ifndef drbg_hash_get_ctx_params_list
static const OSSL_PARAM drbg_hash_get_ctx_params_list[] = {
    OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_DIGEST, NULL, 0),
    OSSL_PARAM_int(OSSL_RAND_PARAM_STATE, NULL),
    OSSL_PARAM_uint(OSSL_RAND_PARAM_STRENGTH, NULL),
    OSSL_PARAM_size_t(OSSL_RAND_PARAM_MAX_REQUEST, NULL),
    OSSL_PARAM_size_t(OSSL_DRBG_PARAM_MIN_ENTROPYLEN, NULL),
    OSSL_PARAM_size_t(OSSL_DRBG_PARAM_MAX_ENTROPYLEN, NULL),
    OSSL_PARAM_size_t(OSSL_DRBG_PARAM_MIN_NONCELEN, NULL),
    OSSL_PARAM_size_t(OSSL_DRBG_PARAM_MAX_NONCELEN, NULL),
    OSSL_PARAM_size_t(OSSL_DRBG_PARAM_MAX_PERSLEN, NULL),
    OSSL_PARAM_size_t(OSSL_DRBG_PARAM_MAX_ADINLEN, NULL),
    OSSL_PARAM_uint(OSSL_DRBG_PARAM_RESEED_COUNTER, NULL),
    OSSL_PARAM_time_t(OSSL_DRBG_PARAM_RESEED_TIME, NULL),
    OSSL_PARAM_uint(OSSL_DRBG_PARAM_RESEED_REQUESTS, NULL),
    OSSL_PARAM_uint64(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL, NULL),
# if defined(FIPS_MODULE)
    OSSL_PARAM_int(OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR, NULL),
# endif
    OSSL_PARAM_END
};
#endif

#ifndef drbg_hash_get_ctx_params_st
struct drbg_hash_get_ctx_params_st {
    OSSL_PARAM *digest;
# if defined(FIPS_MODULE)
    OSSL_PARAM *ind;
# endif
    OSSL_PARAM *maxadlen;
    OSSL_PARAM *maxentlen;
    OSSL_PARAM *maxnonlen;
    OSSL_PARAM *maxperlen;
    OSSL_PARAM *maxreq;
    OSSL_PARAM *minentlen;
    OSSL_PARAM *minnonlen;
    OSSL_PARAM *reseed_cnt;
    OSSL_PARAM *reseed_int;
    OSSL_PARAM *reseed_req;
    OSSL_PARAM *reseed_time;
    OSSL_PARAM *state;
    OSSL_PARAM *str;
};
#endif

#ifndef drbg_hash_get_ctx_params_decoder
static int drbg_hash_get_ctx_params_decoder
    (const OSSL_PARAM *p, struct drbg_hash_get_ctx_params_st *r)
{
    const char *s;

    memset(r, 0, sizeof(*r));
    if (p != NULL)
        for (; (s = p->key) != NULL; p++)
            switch(s[0]) {
            default:
                break;
            case 'd':
                if (ossl_likely(strcmp("igest", s + 1) == 0)) {
                    /* OSSL_DRBG_PARAM_DIGEST */
                    if (ossl_unlikely(r->digest != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->digest = (OSSL_PARAM *)p;
                }
                break;
            case 'f':
# if defined(FIPS_MODULE)
                if (ossl_likely(strcmp("ips-indicator", s + 1) == 0)) {
                    /* OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR */
                    if (ossl_unlikely(r->ind != NULL)) {
                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                       "param %s is repeated", s);
                        return 0;
                    }
                    r->ind = (OSSL_PARAM *)p;
                }
# endif
                break;
            case 'm':
                switch(s[1]) {
                default:
                    break;
                case 'a':
                    switch(s[2]) {
                    default:
                        break;
                    case 'x':
                        switch(s[3]) {
                        default:
                            break;
                        case '_':
                            switch(s[4]) {
                            default:
                                break;
                            case 'a':
                                if (ossl_likely(strcmp("dinlen", s + 5) == 0)) {
                                    /* OSSL_DRBG_PARAM_MAX_ADINLEN */
                                    if (ossl_unlikely(r->maxadlen != NULL)) {
                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                       "param %s is repeated", s);
                                        return 0;
                                    }
                                    r->maxadlen = (OSSL_PARAM *)p;
                                }
                                break;
                            case 'e':
                                if (ossl_likely(strcmp("ntropylen", s + 5) == 0)) {
                                    /* OSSL_DRBG_PARAM_MAX_ENTROPYLEN */
                                    if (ossl_unlikely(r->maxentlen != NULL)) {
                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                       "param %s is repeated", s);
                                        return 0;
                                    }
                                    r->maxentlen = (OSSL_PARAM *)p;
                                }
                                break;
                            case 'n':
                                if (ossl_likely(strcmp("oncelen", s + 5) == 0)) {
                                    /* OSSL_DRBG_PARAM_MAX_NONCELEN */
                                    if (ossl_unlikely(r->maxnonlen != NULL)) {
                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                       "param %s is repeated", s);
                                        return 0;
                                    }
                                    r->maxnonlen = (OSSL_PARAM *)p;
                                }
                                break;
                            case 'p':
                                if (ossl_likely(strcmp("erslen", s + 5) == 0)) {
                                    /* OSSL_DRBG_PARAM_MAX_PERSLEN */
                                    if (ossl_unlikely(r->maxperlen != NULL)) {
                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                       "param %s is repeated", s);
                                        return 0;
                                    }
                                    r->maxperlen = (OSSL_PARAM *)p;
                                }
                                break;
                            case 'r':
                                if (ossl_likely(strcmp("equest", s + 5) == 0)) {
                                    /* OSSL_RAND_PARAM_MAX_REQUEST */
                                    if (ossl_unlikely(r->maxreq != NULL)) {
                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                       "param %s is repeated", s);
                                        return 0;
                                    }
                                    r->maxreq = (OSSL_PARAM *)p;
                                }
                            }
                        }
                    }
                    break;
                case 'i':
                    switch(s[2]) {
                    default:
                        break;
                    case 'n':
                        switch(s[3]) {
                        default:
                            break;
                        case '_':
                            switch(s[4]) {
                            default:
                                break;
                            case 'e':
                                if (ossl_likely(strcmp("ntropylen", s + 5) == 0)) {
                                    /* OSSL_DRBG_PARAM_MIN_ENTROPYLEN */
                                    if (ossl_unlikely(r->minentlen != NULL)) {
                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                       "param %s is repeated", s);
                                        return 0;
                                    }
                                    r->minentlen = (OSSL_PARAM *)p;
                                }
                                break;
                            case 'n':
                                if (ossl_likely(strcmp("oncelen", s + 5) == 0)) {
                                    /* OSSL_DRBG_PARAM_MIN_NONCELEN */
                                    if (ossl_unlikely(r->minnonlen != NULL)) {
                                        ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                       "param %s is repeated", s);
                                        return 0;
                                    }
                                    r->minnonlen = (OSSL_PARAM *)p;
                                }
                            }
                        }
                    }
                }
                break;
            case 'r':
                switch(s[1]) {
                default:
                    break;
                case 'e':
                    switch(s[2]) {
                    default:
                        break;
                    case 's':
                        switch(s[3]) {
                        default:
                            break;
                        case 'e':
                            switch(s[4]) {
                            default:
                                break;
                            case 'e':
                                switch(s[5]) {
                                default:
                                    break;
                                case 'd':
                                    switch(s[6]) {
                                    default:
                                        break;
                                    case '_':
                                        switch(s[7]) {
                                        default:
                                            break;
                                        case 'c':
                                            if (ossl_likely(strcmp("ounter", s + 8) == 0)) {
                                                /* OSSL_DRBG_PARAM_RESEED_COUNTER */
                                                if (ossl_unlikely(r->reseed_cnt != NULL)) {
                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                   "param %s is repeated", s);
                                                    return 0;
                                                }
                                                r->reseed_cnt = (OSSL_PARAM *)p;
                                            }
                                            break;
                                        case 'r':
                                            if (ossl_likely(strcmp("equests", s + 8) == 0)) {
                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
                                                if (ossl_unlikely(r->reseed_req != NULL)) {
                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                   "param %s is repeated", s);
                                                    return 0;
                                                }
                                                r->reseed_req = (OSSL_PARAM *)p;
                                            }
                                            break;
                                        case 't':
                                            switch(s[8]) {
                                            default:
                                                break;
                                            case 'i':
                                                switch(s[9]) {
                                                default:
                                                    break;
                                                case 'm':
                                                    switch(s[10]) {
                                                    default:
                                                        break;
                                                    case 'e':
                                                        switch(s[11]) {
                                                        default:
                                                            break;
                                                        case '_':
                                                            if (ossl_likely(strcmp("interval", s + 12) == 0)) {
                                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
                                                                if (ossl_unlikely(r->reseed_int != NULL)) {
                                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                                   "param %s is repeated", s);
                                                                    return 0;
                                                                }
                                                                r->reseed_int = (OSSL_PARAM *)p;
                                                            }
                                                            break;
                                                        case '\0':
                                                            if (ossl_unlikely(r->reseed_time != NULL)) {
                                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                               "param %s is repeated", s);
                                                                return 0;
                                                            }
                                                            r->reseed_time = (OSSL_PARAM *)p;
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                break;
            case 's':
                switch(s[1]) {
                default:
                    break;
                case 't':
                    switch(s[2]) {
                    default:
                        break;
                    case 'a':
                        if (ossl_likely(strcmp("te", s + 3) == 0)) {
                            /* OSSL_RAND_PARAM_STATE */
                            if (ossl_unlikely(r->state != NULL)) {
                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                               "param %s is repeated", s);
                                return 0;
                            }
                            r->state = (OSSL_PARAM *)p;
                        }
                        break;
                    case 'r':
                        if (ossl_likely(strcmp("ength", s + 3) == 0)) {
                            /* OSSL_RAND_PARAM_STRENGTH */
                            if (ossl_unlikely(r->str != NULL)) {
                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                               "param %s is repeated", s);
                                return 0;
                            }
                            r->str = (OSSL_PARAM *)p;
                        }
                    }
                }
            }
    return 1;
}
#endif
/* End of machine generated */

/* Machine generated by util/perl/OpenSSL/paramnames.pm */
#ifndef drbg_hash_set_ctx_params_list
static const OSSL_PARAM drbg_hash_set_ctx_params_list[] = {
    OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_PROPERTIES, NULL, 0),
    OSSL_PARAM_utf8_string(OSSL_DRBG_PARAM_DIGEST, NULL, 0),
    OSSL_PARAM_utf8_string(OSSL_PROV_PARAM_CORE_PROV_NAME, NULL, 0),
    OSSL_PARAM_uint(OSSL_DRBG_PARAM_RESEED_REQUESTS, NULL),
    OSSL_PARAM_uint64(OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL, NULL),
# if defined(FIPS_MODULE)
    OSSL_PARAM_int(OSSL_KDF_PARAM_FIPS_DIGEST_CHECK, NULL),
# endif
    OSSL_PARAM_END
};
#endif

#ifndef drbg_hash_set_ctx_params_st
struct drbg_hash_set_ctx_params_st {
    OSSL_PARAM *digest;
# if defined(FIPS_MODULE)
    OSSL_PARAM *ind_d;
# endif
    OSSL_PARAM *propq;
    OSSL_PARAM *prov;
    OSSL_PARAM *reseed_req;
    OSSL_PARAM *reseed_time;
};
#endif

#ifndef drbg_hash_set_ctx_params_decoder
static int drbg_hash_set_ctx_params_decoder
    (const OSSL_PARAM *p, struct drbg_hash_set_ctx_params_st *r)
{
    const char *s;

    memset(r, 0, sizeof(*r));
    if (p != NULL)
        for (; (s = p->key) != NULL; p++)
            switch(s[0]) {
            default:
                break;
            case 'd':
                switch(s[1]) {
                default:
                    break;
                case 'i':
                    switch(s[2]) {
                    default:
                        break;
                    case 'g':
                        switch(s[3]) {
                        default:
                            break;
                        case 'e':
                            switch(s[4]) {
                            default:
                                break;
                            case 's':
                                switch(s[5]) {
                                default:
                                    break;
                                case 't':
                                    switch(s[6]) {
                                    default:
                                        break;
                                    case '-':
# if defined(FIPS_MODULE)
                                        if (ossl_likely(strcmp("check", s + 7) == 0)) {
                                            /* OSSL_KDF_PARAM_FIPS_DIGEST_CHECK */
                                            if (ossl_unlikely(r->ind_d != NULL)) {
                                                ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                               "param %s is repeated", s);
                                                return 0;
                                            }
                                            r->ind_d = (OSSL_PARAM *)p;
                                        }
# endif
                                        break;
                                    case '\0':
                                        if (ossl_unlikely(r->digest != NULL)) {
                                            ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                           "param %s is repeated", s);
                                            return 0;
                                        }
                                        r->digest = (OSSL_PARAM *)p;
                                    }
                                }
                            }
                        }
                    }
                }
                break;
            case 'p':
                switch(s[1]) {
                default:
                    break;
                case 'r':
                    switch(s[2]) {
                    default:
                        break;
                    case 'o':
                        switch(s[3]) {
                        default:
                            break;
                        case 'p':
                            if (ossl_likely(strcmp("erties", s + 4) == 0)) {
                                /* OSSL_DRBG_PARAM_PROPERTIES */
                                if (ossl_unlikely(r->propq != NULL)) {
                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                   "param %s is repeated", s);
                                    return 0;
                                }
                                r->propq = (OSSL_PARAM *)p;
                            }
                            break;
                        case 'v':
                            if (ossl_likely(strcmp("ider-name", s + 4) == 0)) {
                                /* OSSL_PROV_PARAM_CORE_PROV_NAME */
                                if (ossl_unlikely(r->prov != NULL)) {
                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                   "param %s is repeated", s);
                                    return 0;
                                }
                                r->prov = (OSSL_PARAM *)p;
                            }
                        }
                    }
                }
                break;
            case 'r':
                switch(s[1]) {
                default:
                    break;
                case 'e':
                    switch(s[2]) {
                    default:
                        break;
                    case 's':
                        switch(s[3]) {
                        default:
                            break;
                        case 'e':
                            switch(s[4]) {
                            default:
                                break;
                            case 'e':
                                switch(s[5]) {
                                default:
                                    break;
                                case 'd':
                                    switch(s[6]) {
                                    default:
                                        break;
                                    case '_':
                                        switch(s[7]) {
                                        default:
                                            break;
                                        case 'r':
                                            if (ossl_likely(strcmp("equests", s + 8) == 0)) {
                                                /* OSSL_DRBG_PARAM_RESEED_REQUESTS */
                                                if (ossl_unlikely(r->reseed_req != NULL)) {
                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                   "param %s is repeated", s);
                                                    return 0;
                                                }
                                                r->reseed_req = (OSSL_PARAM *)p;
                                            }
                                            break;
                                        case 't':
                                            if (ossl_likely(strcmp("ime_interval", s + 8) == 0)) {
                                                /* OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL */
                                                if (ossl_unlikely(r->reseed_time != NULL)) {
                                                    ERR_raise_data(ERR_LIB_PROV, PROV_R_REPEATED_PARAMETER,
                                                                   "param %s is repeated", s);
                                                    return 0;
                                                }
                                                r->reseed_time = (OSSL_PARAM *)p;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
    return 1;
}
#endif
/* End of machine generated */
