summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-04-30 16:06:01 +0200
committerWerner Koch <wk@gnupg.org>1998-04-30 16:06:01 +0200
commit448f8e53fe3e5d5ac54fe7151e512acbb6114ad5 (patch)
tree5cb5878aaff2738558b1355f5f17b48d300cb145 /include
parentNEw (diff)
downloadgnupg2-448f8e53fe3e5d5ac54fe7151e512acbb6114ad5.tar.xz
gnupg2-448f8e53fe3e5d5ac54fe7151e512acbb6114ad5.zip
*** empty log message ***
Diffstat (limited to 'include')
-rw-r--r--include/ChangeLog4
-rw-r--r--include/cipher.h10
-rw-r--r--include/types.h14
-rw-r--r--include/util.h3
4 files changed, 28 insertions, 3 deletions
diff --git a/include/ChangeLog b/include/ChangeLog
index b0dd2b902..94d967df3 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,7 @@
+Sun Apr 26 14:35:24 1998 Werner Koch (wk@isil.d.shuttle.de)
+
+ * types.h: New type u64
+
Mon Mar 9 12:59:55 1998 Werner Koch (wk@isil.d.shuttle.de)
* cipher.h: Included dsa.h.
diff --git a/include/cipher.h b/include/cipher.h
index 87440ef8d..c82d35140 100644
--- a/include/cipher.h
+++ b/include/cipher.h
@@ -41,22 +41,25 @@
#define CIPHER_ALGO_IDEA 1
#define CIPHER_ALGO_3DES 2
#define CIPHER_ALGO_CAST 3
-#define CIPHER_ALGO_BLOWFISH128 4 /* blowfish 128 bit key */
+#define CIPHER_ALGO_BLOWFISH 4 /* blowfish 128 bit key */
#define CIPHER_ALGO_ROT_N 5
#define CIPHER_ALGO_SAFER_SK128 6
#define CIPHER_ALGO_DES_SK 7
-#define CIPHER_ALGO_BLOWFISH 42 /* blowfish 160 bit key (not in OpenPGP)*/
+#define CIPHER_ALGO_BLOWFISH160 42 /* blowfish 160 bit key (not in OpenPGP)*/
#define PUBKEY_ALGO_RSA 1
#define PUBKEY_ALGO_RSA_E 2 /* RSA encrypt only */
#define PUBKEY_ALGO_RSA_S 3 /* RSA sign only */
#define PUBKEY_ALGO_ELGAMAL 16
#define PUBKEY_ALGO_DSA 17
+/*#define PUBKEY_ALGO_ELGAMAL 20 sign and encrypt elgamal */
#define DIGEST_ALGO_MD5 1
#define DIGEST_ALGO_SHA1 2
#define DIGEST_ALGO_RMD160 3
-
+#ifdef WITH_TIGER_HASH
+#define DIGEST_ALGO_TIGER 101
+#endif
typedef struct {
int algo;
@@ -82,6 +85,7 @@ int cipher_debug_mode;
int string_to_cipher_algo( const char *string );
const char * cipher_algo_to_string( int algo );
int check_cipher_algo( int algo );
+unsigned cipher_get_keylen( int algo );
CIPHER_HANDLE cipher_open( int algo, int mode, int secure );
void cipher_close( CIPHER_HANDLE c );
void cipher_setkey( CIPHER_HANDLE c, byte *key, unsigned keylen );
diff --git a/include/types.h b/include/types.h
index e5804be66..41adbbbd8 100644
--- a/include/types.h
+++ b/include/types.h
@@ -66,6 +66,20 @@
#define HAVE_U32_TYPEDEF
#endif
+#ifndef HAVE_U64_TYPEDEF
+ #undef u64 /* maybe there is a macro with this name */
+ #if SIZEOF_UNSIGNED_INT == 8
+ typedef unsigned int u64;
+ #define HAVE_U64_TYPEDEF
+ #elif SIZEOF_UNSIGNED_LONG == 8
+ typedef unsigned long u64;
+ #define HAVE_U64_TYPEDEF
+ #elif __GNUC__ >= 2
+ typedef unsigned long long u64;
+ #define HAVE_U64_TYPEDEF
+ #endif
+#endif
+
diff --git a/include/util.h b/include/util.h
index 3f39656f3..c56cc1991 100644
--- a/include/util.h
+++ b/include/util.h
@@ -107,6 +107,8 @@ const char *print_fname_stdout( const char *s );
/*-- miscutil.c --*/
u32 make_timestamp(void);
+u32 add_days_to_timestamp( u32 stamp, u16 days );
+const char *strtimestamp( u32 stamp );
void print_string( FILE *fp, byte *p, size_t n, int delim );
int answer_is_yes( const char *s );
@@ -116,6 +118,7 @@ void free_strlist( STRLIST sl );
void add_to_strlist( STRLIST *list, const char *string );
STRLIST strlist_prev( STRLIST head, STRLIST node );
STRLIST strlist_last( STRLIST node );
+int memicmp( const char *a, const char *b, size_t n );
const char *memistr( const char *buf, size_t buflen, const char *sub );
char *mem2str( char *, const void *, size_t);
char *trim_spaces( char *string );