aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-11-22 01:55:00 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-06 21:38:54 -0500
commitcc44215eaaa5e4032946b962353526ae6c370c0e (patch)
tree7720cfef24c65f5306bdf738f8f88f3a7a70072f /crypto
parentab7827059adbbcc3624afbc58880287eabf6d277 (diff)
[CRYPTO] api: Remove unused functions
This patch removes the following no longer used functions: - api.c: crypto_alg_available() - digest.c: crypto_digest_init() - digest.c: crypto_digest_update() - digest.c: crypto_digest_final() - digest.c: crypto_digest_digest() Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/api.c15
-rw-r--r--crypto/digest.c48
2 files changed, 0 insertions, 63 deletions
diff --git a/crypto/api.c b/crypto/api.c
index 4fb7fa45cb0d..8c446871cd5b 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -466,23 +466,8 @@ void crypto_free_tfm(struct crypto_tfm *tfm)
466 kfree(tfm); 466 kfree(tfm);
467} 467}
468 468
469int crypto_alg_available(const char *name, u32 flags)
470{
471 int ret = 0;
472 struct crypto_alg *alg = crypto_alg_mod_lookup(name, 0,
473 CRYPTO_ALG_ASYNC);
474
475 if (!IS_ERR(alg)) {
476 crypto_mod_put(alg);
477 ret = 1;
478 }
479
480 return ret;
481}
482
483EXPORT_SYMBOL_GPL(crypto_alloc_tfm); 469EXPORT_SYMBOL_GPL(crypto_alloc_tfm);
484EXPORT_SYMBOL_GPL(crypto_free_tfm); 470EXPORT_SYMBOL_GPL(crypto_free_tfm);
485EXPORT_SYMBOL_GPL(crypto_alg_available);
486 471
487int crypto_has_alg(const char *name, u32 type, u32 mask) 472int crypto_has_alg(const char *name, u32 type, u32 mask)
488{ 473{
diff --git a/crypto/digest.c b/crypto/digest.c
index 0155a94e4b15..8f4593268ce0 100644
--- a/crypto/digest.c
+++ b/crypto/digest.c
@@ -21,54 +21,6 @@
21#include "internal.h" 21#include "internal.h"
22#include "scatterwalk.h" 22#include "scatterwalk.h"
23 23
24void crypto_digest_init(struct crypto_tfm *tfm)
25{
26 struct crypto_hash *hash = crypto_hash_cast(tfm);
27 struct hash_desc desc = { .tfm = hash, .flags = tfm->crt_flags };
28
29 crypto_hash_init(&desc);
30}
31EXPORT_SYMBOL_GPL(crypto_digest_init);
32
33void crypto_digest_update(struct crypto_tfm *tfm,
34 struct scatterlist *sg, unsigned int nsg)
35{
36 struct crypto_hash *hash = crypto_hash_cast(tfm);
37 struct hash_desc desc = { .tfm = hash, .flags = tfm->crt_flags };
38 unsigned int nbytes = 0;
39 unsigned int i;
40
41 for (i = 0; i < nsg; i++)
42 nbytes += sg[i].length;
43
44 crypto_hash_update(&desc, sg, nbytes);
45}
46EXPORT_SYMBOL_GPL(crypto_digest_update);
47
48void crypto_digest_final(struct crypto_tfm *tfm, u8 *out)
49{
50 struct crypto_hash *hash = crypto_hash_cast(tfm);
51 struct hash_desc desc = { .tfm = hash, .flags = tfm->crt_flags };
52
53 crypto_hash_final(&desc, out);
54}
55EXPORT_SYMBOL_GPL(crypto_digest_final);
56
57void crypto_digest_digest(struct crypto_tfm *tfm,
58 struct scatterlist *sg, unsigned int nsg, u8 *out)
59{
60 struct crypto_hash *hash = crypto_hash_cast(tfm);
61 struct hash_desc desc = { .tfm = hash, .flags = tfm->crt_flags };
62 unsigned int nbytes = 0;
63 unsigned int i;
64
65 for (i = 0; i < nsg; i++)
66 nbytes += sg[i].length;
67
68 crypto_hash_digest(&desc, sg, nbytes, out);
69}
70EXPORT_SYMBOL_GPL(crypto_digest_digest);
71
72static int init(struct hash_desc *desc) 24static int init(struct hash_desc *desc)
73{ 25{
74 struct crypto_tfm *tfm = crypto_hash_tfm(desc->tfm); 26 struct crypto_tfm *tfm = crypto_hash_tfm(desc->tfm);