comparison lib/gc.h @ 8109:38b4f50a2b13

lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
author Simon Josefsson <simon@josefsson.org>
date Mon, 05 Feb 2007 11:17:30 +0000
parents 076accb971ef
children e6944904022b
comparison
equal deleted inserted replaced
8108:e22e004d89dd 8109:38b4f50a2b13
1 /* gc.h --- Header file for implementation agnostic crypto wrapper API. 1 /* gc.h --- Header file for implementation agnostic crypto wrapper API.
2 * Copyright (C) 2002, 2003, 2004, 2005 Simon Josefsson 2 * Copyright (C) 2002, 2003, 2004, 2005, 2007 Simon Josefsson
3 * 3 *
4 * This file is free software; you can redistribute it and/or modify 4 * This file is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published 5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2, or (at your 6 * by the Free Software Foundation; either version 2, or (at your
7 * option) any later version. 7 * option) any later version.
43 { 43 {
44 GC_MD4, 44 GC_MD4,
45 GC_MD5, 45 GC_MD5,
46 GC_SHA1, 46 GC_SHA1,
47 GC_MD2, 47 GC_MD2,
48 GC_RMD160 48 GC_RMD160,
49 GC_SHA256,
50 GC_SHA384,
51 GC_SHA512
49 }; 52 };
50 typedef enum Gc_hash Gc_hash; 53 typedef enum Gc_hash Gc_hash;
51 54
52 enum Gc_hash_mode 55 enum Gc_hash_mode
53 { 56 {
60 #define GC_MD2_DIGEST_SIZE 16 63 #define GC_MD2_DIGEST_SIZE 16
61 #define GC_MD4_DIGEST_SIZE 16 64 #define GC_MD4_DIGEST_SIZE 16
62 #define GC_MD5_DIGEST_SIZE 16 65 #define GC_MD5_DIGEST_SIZE 16
63 #define GC_RMD160_DIGEST_SIZE 20 66 #define GC_RMD160_DIGEST_SIZE 20
64 #define GC_SHA1_DIGEST_SIZE 20 67 #define GC_SHA1_DIGEST_SIZE 20
68 #define GC_SHA256_DIGEST_SIZE 32
69 #define GC_SHA384_DIGEST_SIZE 48
70 #define GC_SHA512_DIGEST_SIZE 64
65 71
66 /* Cipher types. */ 72 /* Cipher types. */
67 enum Gc_cipher 73 enum Gc_cipher
68 { 74 {
69 GC_AES128, 75 GC_AES128,