picoquic/tls_api.c
void* picoquic_hash_create(char const* algorithm_name) {
    ptls_hash_context_t* ctx;

    if (strcmp(algorithm_name, "SHA256") == 0) {
        ctx = ptls_openssl_sha256.create();
    }
    else if (strcmp(algorithm_name, "SHA384") == 0) {
        ctx = ptls_openssl_sha384.create();
    }
    else {
        ctx = NULL;
    }

    return (void*)ctx;
}
/* Export hash functions so applications do not need to access picotls */
Export hash functions so applications do not need to access picotls
Export hash functions so applications do not need to access picotls
void* picoquic_hash_create(char const* algorithm_name) {
    ptls_hash_context_t* ctx;
    if (strcmp(algorithm_name, "SHA256") == 0) {
        ctx = ptls_openssl_sha256.create();
    }
    else if (strcmp(algorithm_name, "SHA384") == 0) {
        ctx = ptls_openssl_sha384.create();
    }
    else {
        ctx = NULL;
    }
    return (void*)ctx;
}
void * picoquic_hash_create ( char const * algorithm_name ) { ptls_hash_context_t * ctx ; if ( strcmp ( algorithm_name , " " ) == 0 ) { ctx = ptls_openssl_sha256 . create ( ) ; } else if ( strcmp ( algorithm_name , " " ) == 0 ) { ctx = ptls_openssl_sha384 . create ( ) ; } else { ctx = NULL ; } return ( void * ) ctx ; }
Export hash functions so applications do not need to access picotls
Export hash functions so applications do not need to access picotls