summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2001-12-12 12:04:25 +0000
committerWerner Koch <wk@gnupg.org>2001-12-12 12:04:25 +0000
commit54884ec24d13af4da318e807379a3a0a8373a2e0 (patch)
treeec6712b1a29156b6d2fab797e3994fabd09e0c88 /src
parent906deb96b55a60e58dc39637dd636b110afd11c6 (diff)
downloadlibgcrypt-54884ec24d13af4da318e807379a3a0a8373a2e0.tar.gz
* cipher.c: Added OIDs for AES.
(gcry_cipher_mode_from_oid): New. (gcry_cipher_map_name): Moved OID search code to .. (search_oid): .. new function.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/gcrypt.h8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9e173db8..b4230642 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2001-12-11 Werner Koch <wk@gnupg.org>
+
+ * gcrypt.h: Fixed AES128 macro, add enum for OFB mode.
+
2001-12-05 Werner Koch <wk@gnupg.org>
* misc.c (_gcry_log_printf): New.
diff --git a/src/gcrypt.h b/src/gcrypt.h
index bcfc050b..e49bbc29 100644
--- a/src/gcrypt.h
+++ b/src/gcrypt.h
@@ -189,7 +189,7 @@ GCRY_MPI gcry_sexp_nth_mpi( GCRY_SEXP list, int number, int mpifmt );
enum gcry_mpi_format {
GCRYMPI_FMT_NONE= 0,
GCRYMPI_FMT_STD = 1, /* twos complement stored without length */
- GCRYMPI_FMT_PGP = 2, /* As used by OpenPGP */
+ GCRYMPI_FMT_PGP = 2, /* As used by OpenPGP (only defined as unsigned)*/
GCRYMPI_FMT_SSH = 3, /* As used by SSH (same as 1 but with length)*/
GCRYMPI_FMT_HEX = 4, /* hex format */
GCRYMPI_FMT_USG = 5 /* like STD but this is an unsigned one */
@@ -311,7 +311,7 @@ enum gcry_cipher_algos {
};
#define GCRY_CIPHER_AES GCRY_CIPHER_RIJNDAEL
-#define GCRY_CIPHER_AES128 GCRY_CIPHER_RIJNDAEL128
+#define GCRY_CIPHER_AES128 GCRY_CIPHER_RIJNDAEL
#define GCRY_CIPHER_AES192 GCRY_CIPHER_RIJNDAEL192
#define GCRY_CIPHER_AES256 GCRY_CIPHER_RIJNDAEL256
@@ -320,7 +320,8 @@ enum gcry_cipher_modes {
GCRY_CIPHER_MODE_ECB = 1,
GCRY_CIPHER_MODE_CFB = 2,
GCRY_CIPHER_MODE_CBC = 3,
- GCRY_CIPHER_MODE_STREAM = 4 /* native stream mode of some the algorithms */
+ GCRY_CIPHER_MODE_STREAM = 4, /* native stream mode of some the algorithms */
+ GCRY_CIPHER_MODE_OFB = 5
};
enum gcry_cipher_flags {
@@ -336,6 +337,7 @@ int gcry_cipher_info( GCRY_CIPHER_HD h, int what, void *buffer, size_t *nbytes);
int gcry_cipher_algo_info( int algo, int what, void *buffer, size_t *nbytes);
const char *gcry_cipher_algo_name( int algo );
int gcry_cipher_map_name( const char* name );
+int gcry_cipher_mode_from_oid (const char *string);
int gcry_cipher_encrypt( GCRY_CIPHER_HD h, byte *out, size_t outsize,
const byte *in, size_t inlen );