Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157947
b: refs/heads/master
c: 9429699
h: refs/heads/master
i:
  157945: af2ee42
  157943: 5b3d562
v: v3
  • Loading branch information
Herbert Xu committed Jul 8, 2009
1 parent a9729f5 commit f38244b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97eedce1a64a57648ac5e39f03825528c47ba72e
refs/heads/master: 942969992d86330c9700e2cd9afe8a6bea42df78
9 changes: 9 additions & 0 deletions trunk/crypto/shash.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,5 +509,14 @@ void shash_free_instance(struct crypto_instance *inst)
}
EXPORT_SYMBOL_GPL(shash_free_instance);

int crypto_init_shash_spawn(struct crypto_shash_spawn *spawn,
struct shash_alg *alg,
struct crypto_instance *inst)
{
return crypto_init_spawn2(&spawn->base, &alg->base, inst,
&crypto_shash_type);
}
EXPORT_SYMBOL_GPL(crypto_init_shash_spawn);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Synchronous cryptographic hash type");
14 changes: 14 additions & 0 deletions trunk/include/crypto/internal/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ struct shash_instance {
struct shash_alg alg;
};

struct crypto_shash_spawn {
struct crypto_spawn base;
};

extern const struct crypto_type crypto_ahash_type;

int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err);
Expand All @@ -52,6 +56,10 @@ int crypto_unregister_shash(struct shash_alg *alg);

void shash_free_instance(struct crypto_instance *inst);

int crypto_init_shash_spawn(struct crypto_shash_spawn *spawn,
struct shash_alg *alg,
struct crypto_instance *inst);

static inline void *crypto_ahash_ctx(struct crypto_ahash *tfm)
{
return crypto_tfm_ctx(&tfm->base);
Expand Down Expand Up @@ -106,5 +114,11 @@ static inline struct shash_instance *shash_alloc_instance(
sizeof(struct shash_alg) - sizeof(*alg));
}

static inline struct crypto_shash *crypto_spawn_shash(
struct crypto_shash_spawn *spawn)
{
return crypto_spawn_tfm2(&spawn->base);
}

#endif /* _CRYPTO_INTERNAL_HASH_H */

0 comments on commit f38244b

Please sign in to comment.