mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-25 01:36:32 +08:00
Update Tools
This commit is contained in:
@@ -62,7 +62,7 @@ typedef struct {
|
||||
|
||||
DIGEST_TABLE digest_table[] = {
|
||||
{ OID_sm3, "sm3", "SM3" },
|
||||
{ OID_md5, "md5", "MD5" },
|
||||
// { OID_md5, "md5", "MD5" },
|
||||
{ OID_sha1, "sha1", "SHA-1" },
|
||||
{ OID_sha224, "sha224", "SHA-224" },
|
||||
{ OID_sha256, "sha256", "SHA-256" },
|
||||
@@ -131,8 +131,10 @@ const DIGEST *digest_from_name(const char *name)
|
||||
{
|
||||
if (!strcmp(name, "sm3") || !strcmp(name, "SM3")) {
|
||||
return DIGEST_sm3();
|
||||
/*
|
||||
} else if (!strcmp(name, "md5") || !strcmp(name, "MD5")) {
|
||||
return DIGEST_md5();
|
||||
*/
|
||||
} else if (!strcmp(name, "sha1") || !strcmp(name, "SHA1")) {
|
||||
return DIGEST_sha1();
|
||||
} else if (!strcmp(name, "sha224") || !strcmp(name, "SHA224")) {
|
||||
@@ -196,7 +198,7 @@ const DIGEST *DIGEST_sm3(void)
|
||||
return &sm3_digest_object;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
#include <gmssl/md5.h>
|
||||
|
||||
static int md5_digest_init(DIGEST_CTX *ctx)
|
||||
@@ -243,6 +245,7 @@ const DIGEST *DIGEST_md5(void)
|
||||
{
|
||||
return &md5_digest_object;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
#include <gmssl/sha1.h>
|
||||
@@ -292,7 +295,6 @@ const DIGEST *DIGEST_sha1(void)
|
||||
return &sha1_digest_object;
|
||||
}
|
||||
|
||||
|
||||
#include <gmssl/sha2.h>
|
||||
|
||||
static int sha224_digest_init(DIGEST_CTX *ctx)
|
||||
|
||||
Reference in New Issue
Block a user