summaryrefslogtreecommitdiff
path: root/cipher/sha512.c
diff options
context:
space:
mode:
authorMoritz Schulte <mo@g10code.com>2003-07-21 22:38:51 +0000
committerMoritz Schulte <mo@g10code.com>2003-07-21 22:38:51 +0000
commit8eb1640a0e24466283359b662c349d0e950b6282 (patch)
treeae3cca88e6d97868f143ab0bf75dcf172d89c563 /cipher/sha512.c
parent8ddfcd51c697ff61c1987d7264528a46745312ab (diff)
downloadlibgcrypt-8eb1640a0e24466283359b662c349d0e950b6282.tar.gz
2003-07-21 Moritz Schulte <moritz@g10code.com>
* pubkey.c (gcry_pk_lookup_func_name): Use new member name `aliases' instead of `sexp_names'. * ac.c (gcry_ac_key_data_get): New function. * cipher.c (gcry_cipher_lookup_func_name): Fix return value. 2003-07-20 Moritz Schulte <moritz@g10code.com> * blowfish.c: Adjusted for new gcry_cipher_spec_t structure. * cast5.c: Likewise. * twofish.c: Likewise. * arcfour.c: Likewise. * rijndael.c (rijndael_oids, rijndael192_oids, rijndael256_oids): New variables, adjust for new gcry_cipher_spec_t structure. * des.c (oids_tripledes): New variable, adjust for new gcry_cipher_spec_t structure. * md.c (oid_table): Removed. * tiger.c (oid_spec_tiger): New variable. (digest_spec_tiger): Adjusted for new gry_md_spec_t structure. * sha512.c (oid_spec_sha512): New variable. (digest_spec_sha512): Adjusted for new gry_md_spec_t structure. * sha512.c (oid_spec_sha384): New variable. (digest_spec_sha384): Adjusted for new gry_md_spec_t structure. * sha256.c (oid_spec_sha256): New variable. (digest_spec_sha256): Adjusted for new gry_md_spec_t structure. * sha1.c (oid_spec_sha1): New variable. (digest_spec_sha1): Adjusted for new gry_md_spec_t structure. * rmd160.c (oid_spec_rmd160): New variable. (digest_spec_rnd160): Adjusted for new gry_md_spec_t structure. * md5.c (oid_spec_md5): New variable. (digest_spec_md5): Adjusted for new gry_md_spec_t structure. * md4.c (oid_spec_md4): New variable. (digest_spec_md4): Adjusted for new gry_md_spec_t structure. * crc.c (digest_spec_crc32, digest_spec_crc32_rfc1510, digest_spec_crc32_rfc2440): Adjusted for new gry_md_spec_t structure. 2003-07-19 Moritz Schulte <moritz@g10code.com> * md.c (gcry_md_lookup_func_oid): New function. (search_oid): New function, copied from cipher.c. (gcry_md_map_name): Adjust for new search_oid_interface. * cipher.c (oid_table): Removed table. (gcry_cipher_lookup_func_oid): New function. (search_oid): Rewritten to use the module functions. (gcry_cipher_map_name): Adjust for new search_oid interface. (gcry_cipher_mode_from_oid): Likewise.
Diffstat (limited to 'cipher/sha512.c')
-rw-r--r--cipher/sha512.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/cipher/sha512.c b/cipher/sha512.c
index 7daca350..cdb6c392 100644
--- a/cipher/sha512.c
+++ b/cipher/sha512.c
@@ -367,8 +367,14 @@ static byte sha512_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.3 */
0x00, 0x04, 0x40
};
+static gcry_md_oid_spec_t oid_spec_sha512[] =
+ {
+ { "2.16.840.1.101.3.4.2.3" },
+ { NULL }
+ };
+
gcry_md_spec_t digest_spec_sha512 = {
- "SHA512", sha512_asn, DIM (sha512_asn), 64,
+ "SHA512", sha512_asn, DIM (sha512_asn), oid_spec_sha512, 64,
sha512_init, sha512_write, sha512_final, sha512_read,
sizeof (SHA512_CONTEXT),
};
@@ -380,8 +386,14 @@ static byte sha384_asn[] = /* Object ID is 2.16.840.1.101.3.4.2.2 */
0x00, 0x04, 0x30
};
+static gcry_md_oid_spec_t oid_spec_sha384[] =
+ {
+ { "2.16.840.1.101.3.4.2.2" },
+ { NULL },
+ };
+
gcry_md_spec_t digest_spec_sha384 = {
- "SHA384", sha384_asn, DIM (sha384_asn), 48,
+ "SHA384", sha384_asn, DIM (sha384_asn), oid_spec_sha384, 48,
sha384_init, sha512_write, sha512_final, sha512_read,
sizeof (SHA512_CONTEXT),
};