diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-01-04 14:06:54 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-01-04 14:06:54 +0900 |
commit | f9ba07942b10c72af50bd73c92c4851b6981546e (patch) | |
tree | 988f95d30b6d44d58704f415e767cd69e8672908 /cipher/sha512.c | |
parent | 034e4402dade7a4bcc239913b78c702c5c6f0dbb (diff) | |
download | libgcrypt-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/sha512.c')
-rw-r--r-- | cipher/sha512.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/cipher/sha512.c b/cipher/sha512.c index 2d4f58e0..9cab33d6 100644 --- a/cipher/sha512.c +++ b/cipher/sha512.c @@ -1178,14 +1178,14 @@ run_selftests (int algo, int extended, selftest_report_func_t report) -static byte sha512_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.3 */ +static const byte sha512_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.3 */ { 0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03, 0x05, 0x00, 0x04, 0x40 }; -static gcry_md_oid_spec_t oid_spec_sha512[] = +static const gcry_md_oid_spec_t oid_spec_sha512[] = { { "2.16.840.1.101.3.4.2.3" }, @@ -1195,7 +1195,7 @@ static gcry_md_oid_spec_t oid_spec_sha512[] = { NULL } }; -gcry_md_spec_t _gcry_digest_spec_sha512 = +const gcry_md_spec_t _gcry_digest_spec_sha512 = { GCRY_MD_SHA512, {0, 1}, "SHA512", sha512_asn, DIM (sha512_asn), oid_spec_sha512, 64, @@ -1205,14 +1205,14 @@ gcry_md_spec_t _gcry_digest_spec_sha512 = run_selftests }; -static byte sha384_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.2 */ +static const byte sha384_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.2 */ { 0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02, 0x05, 0x00, 0x04, 0x30 }; -static gcry_md_oid_spec_t oid_spec_sha384[] = +static const gcry_md_oid_spec_t oid_spec_sha384[] = { { "2.16.840.1.101.3.4.2.2" }, @@ -1225,7 +1225,7 @@ static gcry_md_oid_spec_t oid_spec_sha384[] = { NULL }, }; -gcry_md_spec_t _gcry_digest_spec_sha384 = +const gcry_md_spec_t _gcry_digest_spec_sha384 = { GCRY_MD_SHA384, {0, 1}, "SHA384", sha384_asn, DIM (sha384_asn), oid_spec_sha384, 48, @@ -1235,21 +1235,21 @@ gcry_md_spec_t _gcry_digest_spec_sha384 = run_selftests }; -static byte sha512_256_asn[] = +static const byte sha512_256_asn[] = { 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x06, 0x05, 0x00, 0x04, 0x20 }; -static gcry_md_oid_spec_t oid_spec_sha512_256[] = +static const gcry_md_oid_spec_t oid_spec_sha512_256[] = { { "2.16.840.1.101.3.4.2.6" }, { NULL }, }; -gcry_md_spec_t _gcry_digest_spec_sha512_256 = +const gcry_md_spec_t _gcry_digest_spec_sha512_256 = { GCRY_MD_SHA512_256, {0, 1}, "SHA512_256", sha512_256_asn, DIM (sha512_256_asn), oid_spec_sha512_256, 32, @@ -1259,21 +1259,21 @@ gcry_md_spec_t _gcry_digest_spec_sha512_256 = run_selftests }; -static byte sha512_224_asn[] = +static const byte sha512_224_asn[] = { 0x30, 0x2d, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x05, 0x05, 0x00, 0x04, 0x1c }; -static gcry_md_oid_spec_t oid_spec_sha512_224[] = +static const gcry_md_oid_spec_t oid_spec_sha512_224[] = { { "2.16.840.1.101.3.4.2.5" }, { NULL }, }; -gcry_md_spec_t _gcry_digest_spec_sha512_224 = +const gcry_md_spec_t _gcry_digest_spec_sha512_224 = { GCRY_MD_SHA512_224, {0, 1}, "SHA512_224", sha512_224_asn, DIM (sha512_224_asn), oid_spec_sha512_224, 28, |