On Sat, Aug 27, 2011 at 5:19 PM, Niels Möller <[email protected]> wrote: > Andres Mejia <[email protected]> writes: > >> I'm curious, why are the internal transform functions exposed to the public? > > As long as the compression function is only implemented in C, it can be > declared static and put in the same file as the _update and _final > functions which use it. > > But when the compression function is implemented in assembly for some > platforms (there's currently sha1 assembly for x86 and x86_64, and md5 > assembly for x86), it's moved to a separate file, so that configure can > decide to link in an assembly file overriding the C version. And then > the function is exposed like any other global function (but with a name > starting with _nettle to indicate that it is internal). > > One could play with ELF visibility properties, but I haven't tried that > and it's not a general solution.
You could declare the prototype in a private header, rmd_private.h for example. > Regards, > /Niels > > -- > Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. > Internet email is subject to wholesale government surveillance. > -- Regards, Andres Mejia _______________________________________________ nettle-bugs mailing list [email protected] http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs
