C API: Why do some functions require a string length arg

Hello,

Most of the functions in the C api that take a string arg don’t require a string length but some do (eg. the somewhat new MD functions). Is there a reason that some functions ask for length? If possible, I’d prefer for the API not to require length for reasons of simplicity and consistency and if it turns out that there is consensus for this change I’m happy to prepare a patch.

Best, Keith

Hi Keith Sheppard,

Most of the functions in the C api that take a string arg don't require a string
length but some do (eg. the somewhat new MD functions). Is there a reason that
some functions ask for length?

presumably it's to support embedded nuls.

Ciao, Duncan.

  If possible, I'd prefer for the API not to