1 /* Copyright 2001, 2002, 2003 by Hans Reiser, licensing governed by reiser4/README */
3 /* reiser4 digest transform plugin (is used by cryptcompress object plugin) */
4 /* EDWARD-FIXME-HANS: and it does what? a digest is a what? */
5 #include "../../debug.h"
6 #include "../plugin_header.h"
8 #include "../file/cryptcompress.h"
10 #include <linux/types.h>
12 extern digest_plugin digest_plugins
[LAST_DIGEST_ID
];
14 static struct crypto_hash
* alloc_sha256 (void)
17 return crypto_alloc_hash ("sha256", 0, CRYPTO_ALG_ASYNC
);
19 warning("edward-1418", "sha256 unsupported");
20 return ERR_PTR(-EINVAL
);
24 static void free_sha256 (struct crypto_hash
* tfm
)
27 crypto_free_hash(tfm
);
33 digest_plugin digest_plugins
[LAST_DIGEST_ID
] = {
34 [SHA256_32_DIGEST_ID
] = {
36 .type_id
= REISER4_DIGEST_PLUGIN_TYPE
,
37 .id
= SHA256_32_DIGEST_ID
,
40 .desc
= "sha256_32 digest transform",
41 .linkage
= {NULL
, NULL
}
43 .fipsize
= sizeof(__u32
),
44 .alloc
= alloc_sha256
,
51 c-indentation-style: "K&R"