diff options
author | Jia Zhang <qianyue.zj@alibaba-inc.com> | 2017-10-28 23:58:20 -0400 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-10-29 09:11:25 +0100 |
commit | e128f7fb2f0be16d96e5cc274bdd61bcb68313eb (patch) | |
tree | 9b919f579d914e1e6f1c402e305a13b3fff19da6 /lib/gc.h | |
parent | 61f381e0f7daffe7bbef904070d5ca5f81fc2273 (diff) | |
download | gnulib-e128f7fb2f0be16d96e5cc274bdd61bcb68313eb.tar.gz |
New module: crypto/gc-sm3
* lib/gc.h: Declare SM3-related stuffs.
* lib/gc-gnulib.c: Support sm3 in internal functions.
* lib/gc-libgcrypt.c: Support sm3 with libgcrypt.
* m4/gc-sm3.m4: m4 file for gc-sm3 module.
* modules/crypto/gc-sm3: Define gc-sm3 module.
* tests/test-gc-sm3.c: Implement SM3 test case with libgcrypt.
* modules/crypto/gc-sm3-tests: Define gc-sm3 test module.
* MODULES.html.sh: List gc-sm3 module.
Diffstat (limited to 'lib/gc.h')
-rw-r--r-- | lib/gc.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -47,7 +47,8 @@ enum Gc_hash GC_SHA256, GC_SHA384, GC_SHA512, - GC_SHA224 + GC_SHA224, + GC_SM3 }; typedef enum Gc_hash Gc_hash; @@ -69,6 +70,7 @@ typedef void *gc_hash_handle; #define GC_SHA384_DIGEST_SIZE 48 #define GC_SHA512_DIGEST_SIZE 64 #define GC_SHA224_DIGEST_SIZE 24 +#define GC_SM3_DIGEST_SIZE 32 /* Cipher types. */ enum Gc_cipher @@ -156,6 +158,7 @@ extern Gc_rc gc_md2 (const void *in, size_t inlen, void *resbuf); extern Gc_rc gc_md4 (const void *in, size_t inlen, void *resbuf); extern Gc_rc gc_md5 (const void *in, size_t inlen, void *resbuf); extern Gc_rc gc_sha1 (const void *in, size_t inlen, void *resbuf); +extern Gc_rc gc_sm3 (const void *in, size_t inlen, void *resbuf); extern Gc_rc gc_hmac_md5 (const void *key, size_t keylen, const void *in, size_t inlen, char *resbuf); extern Gc_rc gc_hmac_sha1 (const void *key, size_t keylen, |