[vlc-devel] [PATCH 02/14] src: add cleaner md5 API
Francois Cartegnie
fcvlcdev at free.fr
Thu Apr 2 00:39:41 CEST 2020
Le 01/04/2020 à 21:47, Marvin Scholz a écrit :
> +static inline void vlc_hash_BinToHex(void *input, size_t size, char *output)
> +{
> + unsigned char *buffer = input;
> +
> + for (size_t i = 0; i < size; i++) {
> + sprintf(&output[i * 2], "%02" PRIx8, buffer[i]);
> + }
I don't think bin2hex belongs to a specific API.
> +vlc_hash_md5_Init
> +vlc_hash_md5_Update
> +vlc_hash_md5_Finish
> +vlc_hash_md5_FinishHex
If you add a parameter you won't need a new API for a new hash type
--
Francois Cartegnie
VideoLAN - VLC Developer
More information about the vlc-devel
mailing list