summaryrefslogtreecommitdiffstats
path: root/include/digest.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/digest.h')
-rw-r--r--include/digest.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/digest.h b/include/digest.h
index 6148c03da4..2816ddffae 100644
--- a/include/digest.h
+++ b/include/digest.h
@@ -1,9 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* (C) Copyright 2008-2010 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
*/
#ifndef __DIGEST_H__
@@ -79,7 +76,7 @@ struct digest {
/*
* digest functions
*/
-#ifdef CONFIG_DIGEST
+#if defined(CONFIG_DIGEST) || defined(__PBL__)
int digest_algo_register(struct digest_algo *d);
void digest_algo_unregister(struct digest_algo *d);
void digest_algo_prints(const char *prefix);
@@ -164,6 +161,11 @@ static inline const char *digest_name(struct digest *d)
return d->algo->base.name;
}
+static inline enum hash_algo digest_algo(struct digest *d)
+{
+ return d->algo->base.algo;
+}
+
static inline void* digest_ctx(struct digest *d)
{
return d->ctx;