summaryrefslogtreecommitdiff
path: root/cipher/mac-hmac.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2022-01-04 14:06:54 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2022-01-04 14:06:54 +0900
commitf9ba07942b10c72af50bd73c92c4851b6981546e (patch)
tree988f95d30b6d44d58704f415e767cd69e8672908 /cipher/mac-hmac.c
parent034e4402dade7a4bcc239913b78c702c5c6f0dbb (diff)
downloadlibgcrypt-f9ba07942b10c72af50bd73c92c4851b6981546e.tar.gz
cipher: Use const for *_spec_t, if possible.
* cipher/blake2.c: Use const. * cipher/camellia-glue.c, cipher/cipher.c, cipher/crc.c: Likewise. * cipher/des.c, cipher/gost28147.c, cipher/gostr3411-94.c: Likewise. * cipher/keccak.c, cipher/mac-cmac.c, cipher/mac-gmac.c: Likewise. * cipher/mac-hmac.c, cipher/mac-internal.h: Likewise. * cipher/mac-poly1305.c, cipher/mac.c, cipher/md.c: Likewise. * cipher/md.c, cipher/md2.c, cipher/md4.c, cipher/md5.c: Likewise. * cipher/pubkey.c, cipher/rfc2268.c, cipher/rijndael.c: Likewise. * cipher/rmd160.c, cipher/seed.c, cipher/serpent.c: Likewise. * cipher/sha1.c, cipher/sha256.c, cipher/sha512.c: Likewise. * cipher/sm3.c, cipher/sm4.c, cipher/stribog.c: Likewise. * cipher/pubkey.c, cipher/rfc2268.c, cipher/rijndael.c: Likewise. * src/cipher-proto.h, src/cipher.h: Likewise. -- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'cipher/mac-hmac.c')
-rw-r--r--cipher/mac-hmac.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/cipher/mac-hmac.c b/cipher/mac-hmac.c
index 38746241..108a4408 100644
--- a/cipher/mac-hmac.c
+++ b/cipher/mac-hmac.c
@@ -1308,158 +1308,158 @@ static const gcry_mac_spec_ops_t hmac_ops = {
#if USE_SHA1
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha1 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha1 = {
GCRY_MAC_HMAC_SHA1, {0, 1}, "HMAC_SHA1",
&hmac_ops
};
#endif
#if USE_SHA256
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha256 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha256 = {
GCRY_MAC_HMAC_SHA256, {0, 1}, "HMAC_SHA256",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha224 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha224 = {
GCRY_MAC_HMAC_SHA224, {0, 1}, "HMAC_SHA224",
&hmac_ops
};
#endif
#if USE_SHA512
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha512 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha512 = {
GCRY_MAC_HMAC_SHA512, {0, 1}, "HMAC_SHA512",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha384 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha384 = {
GCRY_MAC_HMAC_SHA384, {0, 1}, "HMAC_SHA384",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha512_256 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha512_256 = {
GCRY_MAC_HMAC_SHA512_256, {0, 1}, "HMAC_SHA512_256",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha512_224 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha512_224 = {
GCRY_MAC_HMAC_SHA512_224, {0, 1}, "HMAC_SHA512_224",
&hmac_ops
};
#endif
#if USE_SHA3
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha3_224 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha3_224 = {
GCRY_MAC_HMAC_SHA3_224, {0, 1}, "HMAC_SHA3_224",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha3_256 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha3_256 = {
GCRY_MAC_HMAC_SHA3_256, {0, 1}, "HMAC_SHA3_256",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha3_384 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha3_384 = {
GCRY_MAC_HMAC_SHA3_384, {0, 1}, "HMAC_SHA3_384",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha3_512 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sha3_512 = {
GCRY_MAC_HMAC_SHA3_512, {0, 1}, "HMAC_SHA3_512",
&hmac_ops
};
#endif
#if USE_GOST_R_3411_94
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_gost3411_94 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_gost3411_94 = {
GCRY_MAC_HMAC_GOSTR3411_94, {0, 0}, "HMAC_GOSTR3411_94",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_gost3411_cp = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_gost3411_cp = {
GCRY_MAC_HMAC_GOSTR3411_CP, {0, 0}, "HMAC_GOSTR3411_CP",
&hmac_ops
};
#endif
#if USE_GOST_R_3411_12
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_stribog256 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_stribog256 = {
GCRY_MAC_HMAC_STRIBOG256, {0, 0}, "HMAC_STRIBOG256",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_stribog512 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_stribog512 = {
GCRY_MAC_HMAC_STRIBOG512, {0, 0}, "HMAC_STRIBOG512",
&hmac_ops
};
#endif
#if USE_WHIRLPOOL
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_whirlpool = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_whirlpool = {
GCRY_MAC_HMAC_WHIRLPOOL, {0, 0}, "HMAC_WHIRLPOOL",
&hmac_ops
};
#endif
#if USE_RMD160
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_rmd160 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_rmd160 = {
GCRY_MAC_HMAC_RMD160, {0, 0}, "HMAC_RIPEMD160",
&hmac_ops
};
#endif
#if USE_TIGER
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_tiger1 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_tiger1 = {
GCRY_MAC_HMAC_TIGER1, {0, 0}, "HMAC_TIGER",
&hmac_ops
};
#endif
#if USE_MD5
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_md5 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_md5 = {
GCRY_MAC_HMAC_MD5, {0, 0}, "HMAC_MD5",
&hmac_ops
};
#endif
#if USE_MD4
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_md4 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_md4 = {
GCRY_MAC_HMAC_MD4, {0, 0}, "HMAC_MD4",
&hmac_ops
};
#endif
#if USE_MD2
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_md2 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_md2 = {
GCRY_MAC_HMAC_MD2, {0, 0}, "HMAC_MD2",
&hmac_ops
};
#endif
#if USE_BLAKE2
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_512 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_512 = {
GCRY_MAC_HMAC_BLAKE2B_512, {0, 0}, "HMAC_BLAKE2B_512",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_384 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_384 = {
GCRY_MAC_HMAC_BLAKE2B_384, {0, 0}, "HMAC_BLAKE2B_384",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_256 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_256 = {
GCRY_MAC_HMAC_BLAKE2B_256, {0, 0}, "HMAC_BLAKE2B_256",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_160 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2b_160 = {
GCRY_MAC_HMAC_BLAKE2B_160, {0, 0}, "HMAC_BLAKE2B_160",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_256 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_256 = {
GCRY_MAC_HMAC_BLAKE2S_256, {0, 0}, "HMAC_BLAKE2S_256",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_224 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_224 = {
GCRY_MAC_HMAC_BLAKE2S_224, {0, 0}, "HMAC_BLAKE2S_224",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_160 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_160 = {
GCRY_MAC_HMAC_BLAKE2S_160, {0, 0}, "HMAC_BLAKE2S_160",
&hmac_ops
};
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_128 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_blake2s_128 = {
GCRY_MAC_HMAC_BLAKE2S_128, {0, 0}, "HMAC_BLAKE2S_128",
&hmac_ops
};
#endif
#if USE_SM3
-gcry_mac_spec_t _gcry_mac_type_spec_hmac_sm3 = {
+const gcry_mac_spec_t _gcry_mac_type_spec_hmac_sm3 = {
GCRY_MAC_HMAC_SM3, {0, 0}, "HMAC_SM3",
&hmac_ops
};