aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJames Morris <jmorris@intercode.com.au>2002-11-18 08:00:26 -0800
committerJeff Garzik <jgarzik@redhat.com>2002-11-18 08:00:26 -0800
commit3c7707e07cff36292f7451a1dee045f752c8f924 (patch)
treeaa69f4ceb96c1fdf755dd5f70c864ae7a38404fb /crypto
parent889cb5257af979c531cefdbd02d5a23bc1f572b5 (diff)
downloadhistory-3c7707e07cff36292f7451a1dee045f752c8f924.tar.gz
[CRYPTO]: Add null algorithms and minor cleanups.
Diffstat (limited to 'crypto')
-rw-r--r--crypto/Kconfig6
-rw-r--r--crypto/Makefile1
-rw-r--r--crypto/api.c4
-rw-r--r--crypto/compress.c12
4 files changed, 15 insertions, 8 deletions
diff --git a/crypto/Kconfig b/crypto/Kconfig
index f09c10bcfe6b28..b87a265717d6c0 100644
--- a/crypto/Kconfig
+++ b/crypto/Kconfig
@@ -16,6 +16,12 @@ config CRYPTO_HMAC
HMAC: Keyed-Hashing for Message Authentication (RFC2104).
This is required for IPSec.
+config CRYPTO_NULL
+ tristate "Null algorithms"
+ depends on CRYPTO
+ help
+ These are 'Null' algorithms, used by IPsec, which do nothing.
+
config CRYPTO_MD4
tristate "MD4 digest algorithm"
depends on CRYPTO
diff --git a/crypto/Makefile b/crypto/Makefile
index bd8973bdd84dad..d94a470b3a9d76 100644
--- a/crypto/Makefile
+++ b/crypto/Makefile
@@ -9,6 +9,7 @@ autoload-crypto-$(CONFIG_KMOD) = autoload.o
obj-$(CONFIG_CRYPTO) += api.o cipher.o digest.o compress.o $(autoload-crypto-y)
obj-$(CONFIG_CRYPTO_HMAC) += hmac.o
+obj-$(CONFIG_CRYPTO_NULL) += crypto_null.o
obj-$(CONFIG_CRYPTO_MD4) += md4.o
obj-$(CONFIG_CRYPTO_MD5) += md5.o
obj-$(CONFIG_CRYPTO_SHA1) += sha1.o
diff --git a/crypto/api.c b/crypto/api.c
index 7657bd59eefa3f..0649c6ebb78136 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -63,7 +63,7 @@ static int crypto_init_flags(struct crypto_tfm *tfm, u32 flags)
case CRYPTO_ALG_TYPE_DIGEST:
return crypto_init_digest_flags(tfm, flags);
- case CRYPTO_ALG_TYPE_COMP:
+ case CRYPTO_ALG_TYPE_COMPRESS:
return crypto_init_compress_flags(tfm, flags);
default:
@@ -83,7 +83,7 @@ static int crypto_init_ops(struct crypto_tfm *tfm)
case CRYPTO_ALG_TYPE_DIGEST:
return crypto_init_digest_ops(tfm);
- case CRYPTO_ALG_TYPE_COMP:
+ case CRYPTO_ALG_TYPE_COMPRESS:
return crypto_init_compress_ops(tfm);
default:
diff --git a/crypto/compress.c b/crypto/compress.c
index 773fc576405017..7baaae04794180 100644
--- a/crypto/compress.c
+++ b/crypto/compress.c
@@ -18,15 +18,15 @@
#include <linux/string.h>
#include "internal.h"
-/*
- * This code currently implements blazingly fast and
- * lossless Quadruple ROT13 compression.
- */
static void crypto_compress(struct crypto_tfm *tfm)
-{ }
+{
+ tfm->__crt_alg->cra_compress.coa_compress();
+}
static void crypto_decompress(struct crypto_tfm *tfm)
-{ }
+{
+ tfm->__crt_alg->cra_compress.coa_decompress();
+}
int crypto_init_compress_flags(struct crypto_tfm *tfm, u32 flags)
{