summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2003-07-22 19:09:32 +0000
committerKen Raeburn <raeburn@mit.edu>2003-07-22 19:09:32 +0000
commit60ac58b5130b6ff110e9aeb569c29eeb20823840 (patch)
tree64c1523b7c4e1f5a8e905954cb81623f2c92eac0 /src/include
parent3610cd5cd67a4f6f9234de36410a75a2902842fe (diff)
downloadkrb5-60ac58b5130b6ff110e9aeb569c29eeb20823840.tar.gz
krb5-60ac58b5130b6ff110e9aeb569c29eeb20823840.tar.xz
krb5-60ac58b5130b6ff110e9aeb569c29eeb20823840.zip
Change crypto "provider" structures to hold numeric values instead of function
pointers for key sizes, block sizes, etc., when the values are always constant for each encryption or hash mechanism. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15714 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ChangeLog3
-rw-r--r--src/include/k5-int.h10
2 files changed, 6 insertions, 7 deletions
diff --git a/src/include/ChangeLog b/src/include/ChangeLog
index eb2606dea..4f8012c3a 100644
--- a/src/include/ChangeLog
+++ b/src/include/ChangeLog
@@ -2,6 +2,9 @@
* k5-int.h (krb5int_zap_data, zap): New macros; call memset with
volatile cast for now.
+ (struct krb5_enc_provider, struct krb5_hash_provider, struct
+ krb5_keyhash_provider): Use numeric values for block size,
+ key size, hash size, etc, instead of function pointers.
2003-07-21 Alexandra Ellwood <lxs@mit.edu>
diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index 3c2e382f8..2be8ce590 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -565,11 +565,9 @@ krb5int_locate_server (krb5_context,
/* new encryption provider api */
struct krb5_enc_provider {
- void (*block_size) (size_t *output);
-
/* keybytes is the input size to make_key;
keylength is the output size */
- void (*keysize) (size_t *keybytes, size_t *keylength);
+ size_t block_size, keybytes, keylength;
/* cipher-state == 0 fresh state thrown away at end */
krb5_error_code (*encrypt) (const krb5_keyblock *key,
@@ -592,9 +590,7 @@ struct krb5_enc_provider {
};
struct krb5_hash_provider {
- void (*hash_size) (size_t *output);
-
- void (*block_size) (size_t *output);
+ size_t hashsize, blocksize;
/* this takes multiple inputs to avoid lots of copying. */
krb5_error_code (*hash) (unsigned int icount, const krb5_data *input,
@@ -602,7 +598,7 @@ struct krb5_hash_provider {
};
struct krb5_keyhash_provider {
- void (*hash_size) (size_t *output);
+ size_t hashsize;
krb5_error_code (*hash) (const krb5_keyblock *key,
krb5_keyusage keyusage,