On Dec 27, 2016, at 2:59 AM, Niels Möller nisse@lysator.liu.se wrote:
I'm experimenting with this... Starting with hashes which are the simplest primitive. Header file changes below. Comments appreciated, including naming suggestions.
[snip]
+struct nettle_hash;
+size_t +nettle_hash_get_context_size(const struct nettle_hash *hash);
+size_t +nettle_hash_get_digest_size(const struct nettle_hash *hash);
+void +nettle_hash_init(const struct nettle_hash *hash, void *ctx);
+void +nettle_hash_update(const struct nettle_hash *hash,
void *ctx, size_t length, const uint8_t *src);
+void +nettle_hash_digest(const struct nettle_hash *hash,
void *ctx, size_t length, uint8_t *dst);
+const struct nettle_hash * +nettle_lookup_hash (const char *name);
This looks good to me, for non-keyed hashes.