diff options
Diffstat (limited to '')
-rw-r--r-- | libhashsum.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/libhashsum.h b/libhashsum.h index 7673a74..01d8fbd 100644 --- a/libhashsum.h +++ b/libhashsum.h @@ -9,10 +9,12 @@ # define LIBHASHSUM_USERET_ __attribute__((__warn_unused_result__)) # define LIBHASHSUM_1_NONNULL_ __attribute__((__nonnull__(1))) # define LIBHASHSUM_NONNULL_ __attribute__((__nonnull__)) +# define LIBHASHSUM_PURE_ __attribute__((__pure__)) #else # define LIBHASHSUM_USERET_ # define LIBHASHSUM_1_NONNULL_ # define LIBHASHSUM_NONNULL_ +# define LIBHASHSUM_PURE_ #endif @@ -481,18 +483,6 @@ struct libhashsum_hasher { unsigned char hash_excess_bits; /* TODO test */ /** - * Estimate, approximate performance relative to - * some unspecified reference point - * - * Higher is faster - * - * If the value is zero, no estimate is available - * - * @since 1.1 - */ - uint64_t relative_performance; /* TODO man */ - - /** * Update the hash state given additional * input data * @@ -697,6 +687,22 @@ LIBHASHSUM_NONNULL_ int libhashsum_init_hasher_from_string(struct libhashsum_hasher *this, const char *algorithm); /** + * Get an estimate, approximate performance relative, + * to some unspecified reference point, for a configured + * hash function + * + * Higher is faster + * + * @param this The hash function details + * @return Estimate, approximate performance value, + * 0 no estimate is available + * + * @since 1.1 + */ +LIBHASHSUM_NONNULL_ LIBHASHSUM_PURE_ +uint64_t libhashsum_get_relative_performance(struct libhashsum_hasher *this); + +/** * Create an initialised state for MD2 * hashing and return hash functions and details * |