Remove a memset
[openssl.git] / crypto / sm2 / sm2_za.c
index 9b1f70cdddecb5b43bf1a22877edbd206ac078ae..8f45082db43130f1dc6ab283ea0ccadb8d8d48a6 100644 (file)
@@ -15,8 +15,9 @@
 #include <openssl/evp.h>
 #include <openssl/bn.h>
 #include <string.h>
+#include "internal/numbers.h"
 
-int SM2_compute_userid_digest(uint8_t *out,
+int sm2_compute_userid_digest(uint8_t *out,
                               const EVP_MD *digest,
                               const char *user_id,
                               const EC_KEY *key)
@@ -58,8 +59,6 @@ int SM2_compute_userid_digest(uint8_t *out,
         goto done;
     }
 
-    memset(out, 0, EVP_MD_size(digest));
-
     if (!EVP_DigestInit(hash, digest)) {
         SM2err(SM2_F_SM2_COMPUTE_USERID_DIGEST, ERR_R_EVP_LIB);
         goto done;