1e1051a39Sopenharmony_ci/* 2e1051a39Sopenharmony_ci * Copyright 2017-2021 The OpenSSL Project Authors. All Rights Reserved. 3e1051a39Sopenharmony_ci * Copyright 2017 Ribose Inc. All Rights Reserved. 4e1051a39Sopenharmony_ci * 5e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License"). You may not use 6e1051a39Sopenharmony_ci * this file except in compliance with the License. You can obtain a copy 7e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at 8e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html 9e1051a39Sopenharmony_ci */ 10e1051a39Sopenharmony_ci 11e1051a39Sopenharmony_ci 12e1051a39Sopenharmony_ci#include "crypto/evp.h" 13e1051a39Sopenharmony_ci#include "../evp/legacy_meth.h" 14e1051a39Sopenharmony_ci#include "internal/sm3.h" 15e1051a39Sopenharmony_ci 16e1051a39Sopenharmony_ciIMPLEMENT_LEGACY_EVP_MD_METH_LC(sm3_int, ossl_sm3) 17e1051a39Sopenharmony_ci 18e1051a39Sopenharmony_cistatic const EVP_MD sm3_md = { 19e1051a39Sopenharmony_ci NID_sm3, 20e1051a39Sopenharmony_ci NID_sm3WithRSAEncryption, 21e1051a39Sopenharmony_ci SM3_DIGEST_LENGTH, 22e1051a39Sopenharmony_ci 0, 23e1051a39Sopenharmony_ci EVP_ORIG_GLOBAL, 24e1051a39Sopenharmony_ci LEGACY_EVP_MD_METH_TABLE(sm3_int_init, sm3_int_update, sm3_int_final, NULL, 25e1051a39Sopenharmony_ci SM3_CBLOCK), 26e1051a39Sopenharmony_ci}; 27e1051a39Sopenharmony_ci 28e1051a39Sopenharmony_ciconst EVP_MD *EVP_sm3(void) 29e1051a39Sopenharmony_ci{ 30e1051a39Sopenharmony_ci return &sm3_md; 31e1051a39Sopenharmony_ci} 32