X-Git-Url: https://www.bearssl.org/gitweb//home/git/?p=BearSSL;a=blobdiff_plain;f=tools%2Fbrssl.h;h=f2957e640f4db949768c0ccb68110fc1f717aa8b;hp=8c84b04483c85124202b63905b2ac6ca2c8d0c34;hb=ad6a51bde35d008521e3c667f64c43630351abec;hpb=3f00688b9d9f483a6ca97e659eea104995ea15b7 diff --git a/tools/brssl.h b/tools/brssl.h index 8c84b04..f2957e6 100644 --- a/tools/brssl.h +++ b/tools/brssl.h @@ -471,6 +471,18 @@ const br_hash_class *get_hash_impl(int id); */ const char *find_error_name(int err, const char **comment); +/* + * Find the symbolic name for an algorithm implementation. Provided + * pointer should be a pointer to a vtable or to a function, where + * appropriate. If not recognised, then the string "UNKNOWN" is returned. + * + * If 'long_name' is non-zero, then the returned name recalls the + * algorithm type as well; otherwise, only the core implementation name + * is returned (e.g. the long name could be 'aes_big_cbcenc' while the + * short name is 'big'). + */ +const char *get_algo_name(const void *algo, int long_name); + /* * Run a SSL engine, with a socket connected to the peer, and using * stdin/stdout to exchange application data.