From 805904312e781e852c4c198ad91b32bac3c95c4e Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Wed, 5 Mar 2003 03:03:04 +0000 Subject: Clean up PBKDF2 interface. Add s2k-params to string-to-key interface, except no new decl in krb5.h yet; rename changed s2k functions to use krb5int_ prefix. Add AES to etype table. Delete some unused declarations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15229 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/string_to_key.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/lib/crypto/string_to_key.c') diff --git a/src/lib/crypto/string_to_key.c b/src/lib/crypto/string_to_key.c index f6ddf9d690..cccfd1c1a3 100644 --- a/src/lib/crypto/string_to_key.c +++ b/src/lib/crypto/string_to_key.c @@ -34,6 +34,19 @@ krb5_c_string_to_key(context, enctype, string, salt, key) const krb5_data *string; const krb5_data *salt; krb5_keyblock *key; +{ + return krb5_c_string_to_key_with_params(context, enctype, string, salt, + NULL, key); +} + +krb5_error_code KRB5_CALLCONV +krb5_c_string_to_key_with_params(context, enctype, string, salt, params, key) + krb5_context context; + krb5_enctype enctype; + const krb5_data *string; + const krb5_data *salt; + const krb5_data *params; + krb5_keyblock *key; { int i; krb5_error_code ret; @@ -59,7 +72,8 @@ krb5_c_string_to_key(context, enctype, string, salt, key) key->enctype = enctype; key->length = keylength; - if ((ret = ((*(krb5_enctypes_list[i].str2key))(enc, string, salt, key)))) { + ret = (*krb5_enctypes_list[i].str2key)(enc, string, salt, params, key); + if (ret) { memset(key->contents, 0, keylength); free(key->contents); } -- cgit