• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/crypto/

Lines Matching defs:alg

326 	struct shash_alg *alg = __crypto_shash_alg(calg);
349 if (alg->setkey)
351 if (alg->export)
353 if (alg->import)
449 struct shash_alg *alg = __crypto_shash_alg(calg);
480 crt->digestsize = alg->digestsize;
495 static unsigned int crypto_shash_ctxsize(struct crypto_alg *alg, u32 type,
514 static unsigned int crypto_shash_extsize(struct crypto_alg *alg)
516 return alg->cra_ctxsize;
519 static void crypto_shash_show(struct seq_file *m, struct crypto_alg *alg)
521 static void crypto_shash_show(struct seq_file *m, struct crypto_alg *alg)
523 struct shash_alg *salg = __crypto_shash_alg(alg);
526 seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
551 static int shash_prepare_alg(struct shash_alg *alg)
553 struct crypto_alg *base = &alg->base;
555 if (alg->digestsize > PAGE_SIZE / 8 ||
556 alg->descsize > PAGE_SIZE / 8 ||
557 alg->statesize > PAGE_SIZE / 8)
564 if (!alg->finup)
565 alg->finup = shash_finup_unaligned;
566 if (!alg->digest)
567 alg->digest = shash_digest_unaligned;
568 if (!alg->export) {
569 alg->export = shash_default_export;
570 alg->import = shash_default_import;
571 alg->statesize = alg->descsize;
573 if (!alg->setkey)
574 alg->setkey = shash_no_setkey;
579 int crypto_register_shash(struct shash_alg *alg)
581 struct crypto_alg *base = &alg->base;
584 err = shash_prepare_alg(alg);
592 int crypto_unregister_shash(struct shash_alg *alg)
594 return crypto_unregister_alg(&alg->base);
603 err = shash_prepare_alg(&inst->alg);
619 struct shash_alg *alg,
622 return crypto_init_spawn2(&spawn->base, &alg->base, inst,
629 struct crypto_alg *alg;
631 alg = crypto_attr_alg2(rta, &crypto_shash_type, type, mask);
632 return IS_ERR(alg) ? ERR_CAST(alg) :
633 container_of(alg, struct shash_alg, base);