Add features support to af_alg plugin
This commit is contained in:
@@ -46,7 +46,7 @@ static struct {
|
||||
hash_algorithm_t id;
|
||||
char *name;
|
||||
size_t size;
|
||||
} algs[] = {
|
||||
} algs[AF_ALG_HASHER] = {
|
||||
{HASH_SHA1, "sha1", HASH_SIZE_SHA1 },
|
||||
{HASH_MD5, "md5", HASH_SIZE_MD5 },
|
||||
{HASH_SHA224, "sha224", HASH_SIZE_SHA224 },
|
||||
@@ -59,7 +59,7 @@ static struct {
|
||||
/**
|
||||
* See header.
|
||||
*/
|
||||
void af_alg_hasher_probe(char *plugin)
|
||||
void af_alg_hasher_probe(plugin_feature_t *features, int *pos)
|
||||
{
|
||||
af_alg_ops_t *ops;
|
||||
int i;
|
||||
@@ -70,8 +70,7 @@ void af_alg_hasher_probe(char *plugin)
|
||||
if (ops)
|
||||
{
|
||||
ops->destroy(ops);
|
||||
lib->crypto->add_hasher(lib->crypto, algs[i].id, plugin,
|
||||
(hasher_constructor_t)af_alg_hasher_create);
|
||||
features[(*pos)++] = PLUGIN_PROVIDE(HASHER, algs[i].id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user