X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_md2012.c;h=3ea1e3642855cb7644001d6e221d886ae198ec84;hb=e847cc4876d2b105b119e0db1e4166d266642a66;hp=8d1bde8d8e0912e48e942acb943ffe6195015b9a;hpb=ec78b0e7d8df62895b6ad489cd7f94699888ffeb;p=openssl-gost%2Fengine.git diff --git a/gost_md2012.c b/gost_md2012.c index 8d1bde8..3ea1e36 100644 --- a/gost_md2012.c +++ b/gost_md2012.c @@ -1,6 +1,7 @@ /********************************************************************** * gost_md2012.c * * Copyright (c) 2013 Cryptocom LTD. * + * Copyright (c) 2020 Vitaly Chikunov * * This file is distributed under the same license as OpenSSL * * * * GOST R 34.11-2012 interface to OpenSSL engine. * @@ -39,40 +40,22 @@ GOST_digest GostR3411_2012_template_digest = { GOST_digest GostR3411_2012_256_digest = { .nid = NID_id_GostR3411_2012_256, + .alias = "streebog256", .template = &GostR3411_2012_template_digest, .result_size = 32, .init = gost_digest_init256, .ctrl = gost_digest_ctrl_256, }; -EVP_MD *digest_gost2012_256(void) -{ - return GOST_init_digest(&GostR3411_2012_256_digest); -} - -void digest_gost2012_256_destroy(void) -{ - GOST_deinit_digest(&GostR3411_2012_256_digest); -} - GOST_digest GostR3411_2012_512_digest = { .nid = NID_id_GostR3411_2012_512, + .alias = "streebog512", .template = &GostR3411_2012_template_digest, .result_size = 64, .init = gost_digest_init512, .ctrl = gost_digest_ctrl_512, }; -EVP_MD *digest_gost2012_512(void) -{ - return GOST_init_digest(&GostR3411_2012_512_digest); -} - -void digest_gost2012_512_destroy(void) -{ - GOST_deinit_digest(&GostR3411_2012_512_digest); -} - static int gost_digest_init512(EVP_MD_CTX *ctx) { init_gost2012_hash_ctx((gost2012_hash_ctx *) EVP_MD_CTX_md_data(ctx),