aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/algorithms.h
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2004-10-12 17:35:50 +0000
committerDavid Shaw <[email protected]>2004-10-12 17:35:50 +0000
commitb15cc684b8a6fe6edc89370d359849eeab05089b (patch)
tree0f05ea572a2c18dd2924c6b7e0ebd18836f97ce6 /cipher/algorithms.h
parent(read_parameter_file): Changed to use iobuf based file (diff)
downloadgnupg-b15cc684b8a6fe6edc89370d359849eeab05089b.tar.gz
gnupg-b15cc684b8a6fe6edc89370d359849eeab05089b.zip
* algorithms.h, cast5.c, cipher.c, idea-stub.c, twofish.c, blowfish.c,
des.c, rijndael.c: Consistently use const for input buffers.
Diffstat (limited to 'cipher/algorithms.h')
-rw-r--r--cipher/algorithms.h52
1 files changed, 25 insertions, 27 deletions
diff --git a/cipher/algorithms.h b/cipher/algorithms.h
index 2802a2acd..36fc8442e 100644
--- a/cipher/algorithms.h
+++ b/cipher/algorithms.h
@@ -79,55 +79,53 @@ sha512_get_info (int algo, size_t *contextsize,
const char *
des_get_info( int algo, size_t *keylen,
- size_t *blocksize, size_t *contextsize,
- int (**setkeyf)( void *c, byte *key, unsigned keylen ),
- void (**encryptf)( void *c, byte *outbuf, byte *inbuf ),
- void (**decryptf)( void *c, byte *outbuf, byte *inbuf )
- );
+ size_t *blocksize, size_t *contextsize,
+ int (**setkeyf)( void *c, const byte *key, unsigned keylen ),
+ void (**encryptf)( void *c, byte *outbuf, const byte *inbuf ),
+ void (**decryptf)( void *c, byte *outbuf, const byte *inbuf )
+ );
const char *
cast5_get_info( int algo, size_t *keylen,
- size_t *blocksize, size_t *contextsize,
- int (**setkeyf)( void *c, byte *key, unsigned keylen ),
- void (**encryptf)( void *c, byte *outbuf, byte *inbuf ),
- void (**decryptf)( void *c, byte *outbuf, byte *inbuf )
- );
+ size_t *blocksize, size_t *contextsize,
+ int (**setkeyf)( void *c, const byte *key, unsigned keylen ),
+ void (**encryptf)( void *c, byte *outbuf, const byte *inbuf ),
+ void (**decryptf)( void *c, byte *outbuf, const byte *inbuf )
+ );
const char *
blowfish_get_info( int algo, size_t *keylen,
size_t *blocksize, size_t *contextsize,
- int (**setkeyf)( void *c, byte *key, unsigned keylen ),
- void (**encryptf)( void *c, byte *outbuf, byte *inbuf ),
- void (**decryptf)( void *c, byte *outbuf, byte *inbuf )
+ int (**setkeyf)(void *c, const byte *key, unsigned keylen),
+ void (**encryptf)(void *c, byte *outbuf, const byte *inbuf),
+ void (**decryptf)(void *c, byte *outbuf, const byte *inbuf)
);
const char *
twofish_get_info( int algo, size_t *keylen,
- size_t *blocksize, size_t *contextsize,
- int (**setkeyf)( void *c, byte *key, unsigned keylen ),
- void (**encryptf)( void *c, byte *outbuf, byte *inbuf ),
- void (**decryptf)( void *c, byte *outbuf, byte *inbuf )
- );
+ size_t *blocksize, size_t *contextsize,
+ int (**setkeyf)( void *c, const byte *key, unsigned keylen ),
+ void (**encryptf)( void *c, byte *outbuf, const byte *inbuf),
+ void (**decryptf)( void *c, byte *outbuf, const byte *inbuf )
+ );
/* this is just a kludge for the time we have not yet changed the cipher
* stuff to the scheme we use for random and digests */
const char *
rijndael_get_info( int algo, size_t *keylen,
size_t *blocksize, size_t *contextsize,
- int (**setkeyf)( void *c, byte *key, unsigned keylen ),
- void (**encryptf)( void *c, byte *outbuf, byte *inbuf ),
- void (**decryptf)( void *c, byte *outbuf, byte *inbuf )
- );
+ int (**setkeyf)( void *c, const byte *key, unsigned keylen),
+ void (**encryptf)(void *c, byte *outbuf, const byte *inbuf),
+ void (**decryptf)(void *c, byte *outbuf, const byte *inbuf)
+ );
const char *
idea_get_info( int algo, size_t *keylen,
size_t *blocksize, size_t *contextsize,
- int (**setkeyf)( void *c, byte *key, unsigned keylen ),
- void (**encryptf)( void *c, byte *outbuf, byte *inbuf ),
- void (**decryptf)( void *c, byte *outbuf, byte *inbuf )
+ int (**setkeyf)( void *c, const byte *key, unsigned keylen ),
+ void (**encryptf)( void *c, byte *outbuf, const byte *inbuf ),
+ void (**decryptf)( void *c, byte *outbuf, const byte *inbuf )
);
-
-
#endif /*GNUPG_ALGORITHMS_H*/