Commit 0143b03d authored by Niels Möller's avatar Niels Möller

New function nettle_get_armors.

parent b076e62e
2017-04-09 Niels Möller <nisse@lysator.liu.se>
* nettle-meta.h (nettle_ciphers, nettle_aeads): New macros,
analogous to below change to nettle_hashes.
* nettle-meta.h (nettle_ciphers, nettle_aeads, nettle_armors): New
macros, analogous to below change to nettle_hashes.
* nettle-meta-ciphers.c (_nettle_ciphers): Renamed array, from...
(nettle_ciphers: ... old name.
......@@ -11,6 +11,10 @@
(nettle_aeads: ... old name.
(nettle_get_aeads): New function.
* nettle-meta-armors.c (_nettle_armors): Renamed array, from...
(nettle_armors: ... old name.
(nettle_get_armors): New function.
2017-01-12 Niels Möller <nisse@lysator.liu.se>
* tools/nettle-hash.c (find_algorithm): Deleted function.
......
......@@ -36,9 +36,15 @@
#include <stddef.h>
#include "nettle-meta.h"
const struct nettle_armor * const nettle_armors[] = {
const struct nettle_armor * const _nettle_armors[] = {
&nettle_base64,
&nettle_base64url,
&nettle_base16,
NULL
};
const struct nettle_armor * const *
nettle_get_armors (void)
{
return _nettle_armors;
}
......@@ -244,7 +244,15 @@ struct nettle_armor
}
/* null-terminated list of armor schemes implemented by this version of nettle */
extern const struct nettle_armor * const nettle_armors[];
extern const struct nettle_armor * const _nettle_armors[];
const struct nettle_armor * const *
#ifdef __GNUC__
__attribute__((pure))
#endif
nettle_get_armors (void);
#define nettle_armors (nettle_get_armors())
extern const struct nettle_armor nettle_base64;
extern const struct nettle_armor nettle_base64url;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment