Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329703
b: refs/heads/master
c: 648b2a1
h: refs/heads/master
i:
  329701: 473766f
  329699: a70c7dc
  329695: 39c8597
v: v3
  • Loading branch information
Jussi Kivilinna authored and Herbert Xu committed Aug 1, 2012
1 parent 56a7b77 commit 205e16b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6aeb49bc5a6fffe2f8ba0668cf7459b6a4b672dc
refs/heads/master: 648b2a102d268d41d8116abde9081327c1be82e8
20 changes: 5 additions & 15 deletions trunk/crypto/sha512_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ static int sha384_final(struct shash_desc *desc, u8 *hash)
return 0;
}

static struct shash_alg sha512 = {
static struct shash_alg sha512_algs[2] = { {
.digestsize = SHA512_DIGEST_SIZE,
.init = sha512_init,
.update = sha512_update,
Expand All @@ -254,9 +254,7 @@ static struct shash_alg sha512 = {
.cra_blocksize = SHA512_BLOCK_SIZE,
.cra_module = THIS_MODULE,
}
};

static struct shash_alg sha384 = {
}, {
.digestsize = SHA384_DIGEST_SIZE,
.init = sha384_init,
.update = sha512_update,
Expand All @@ -268,24 +266,16 @@ static struct shash_alg sha384 = {
.cra_blocksize = SHA384_BLOCK_SIZE,
.cra_module = THIS_MODULE,
}
};
} };

static int __init sha512_generic_mod_init(void)
{
int ret = 0;

if ((ret = crypto_register_shash(&sha384)) < 0)
goto out;
if ((ret = crypto_register_shash(&sha512)) < 0)
crypto_unregister_shash(&sha384);
out:
return ret;
return crypto_register_shashes(sha512_algs, ARRAY_SIZE(sha512_algs));
}

static void __exit sha512_generic_mod_fini(void)
{
crypto_unregister_shash(&sha384);
crypto_unregister_shash(&sha512);
crypto_unregister_shashes(sha512_algs, ARRAY_SIZE(sha512_algs));
}

module_init(sha512_generic_mod_init);
Expand Down

0 comments on commit 205e16b

Please sign in to comment.