目录
2.1.1 err = frontend->init_tfm(tfm);
2.1.2 if (!tfm->exit && alg->cra_init && (err = alg->cra_init(tfm)))
1. 可以运行的case
1.1 hash驱动代码(.ko)
static struct shash_alg osr_hash_sm3_alg = {
.digestsize = SM3_DIGEST_SIZE,
.init = osr_sm3_init,
.update = osr_hash_update,
.final = osr_hash_final,
.export = osr_hash_export,
.import = osr_hash_import,
.descsize = sizeof(struct osr_hash_state),
.statesize = sizeof(struct osr_hash_state),
.base = {
.cra_name = "sm3",
.cra_driver_name = "sm3-osr",
.cra_blocksize = SM3_BLOCK_SIZE,
.cra_module = THIS_MODULE,
}
};