crypto: sm3 - export crypto_sm3_final function
[linux-2.6-microblaze.git] / crypto / sm3_generic.c
index 3468975..193c458 100644 (file)
@@ -149,17 +149,18 @@ int crypto_sm3_update(struct shash_desc *desc, const u8 *data,
 }
 EXPORT_SYMBOL(crypto_sm3_update);
 
-static int sm3_final(struct shash_desc *desc, u8 *out)
+int crypto_sm3_final(struct shash_desc *desc, u8 *out)
 {
        sm3_base_do_finalize(desc, sm3_generic_block_fn);
        return sm3_base_finish(desc, out);
 }
+EXPORT_SYMBOL(crypto_sm3_final);
 
 int crypto_sm3_finup(struct shash_desc *desc, const u8 *data,
                        unsigned int len, u8 *hash)
 {
        sm3_base_do_update(desc, data, len, sm3_generic_block_fn);
-       return sm3_final(desc, hash);
+       return crypto_sm3_final(desc, hash);
 }
 EXPORT_SYMBOL(crypto_sm3_finup);
 
@@ -167,7 +168,7 @@ static struct shash_alg sm3_alg = {
        .digestsize     =       SM3_DIGEST_SIZE,
        .init           =       sm3_base_init,
        .update         =       crypto_sm3_update,
-       .final          =       sm3_final,
+       .final          =       crypto_sm3_final,
        .finup          =       crypto_sm3_finup,
        .descsize       =       sizeof(struct sm3_state),
        .base           =       {