From 60ac58b5130b6ff110e9aeb569c29eeb20823840 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 22 Jul 2003 19:09:32 +0000 Subject: 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 --- src/include/ChangeLog | 3 +++ src/include/k5-int.h | 10 +++------- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/include') 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 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, -- cgit